library/src/datastructures/BP-HashTable.cc
// memory compare hash table keyed entry (binary only compare)
memory compare hash table keyed entry (binary only compare)
memory compare hash table keyed entry ( binary only compare )
BP_ERROR_T ht_memmatch_entry
(
		P_BP_HASH_TABLE_KEYED_ENTRY entry,
		char  *buff,
		size_t buff_size
)
{
	if(!ht_entry_is_blob(entry))
		return ERR_FAILURE;
	if(entry->data_size != buff_size)
		return ERR_FAILURE;
	if(!entry->data)
		return ERR_FAILURE;
	if(memcmp(entry->data, buff, buff_size) == 0)
		return ERR_SUCCESS;
	return ERR_FAILURE;
}
BP_ERROR_T ht_memmatch_entry ( P_BP_HASH_TABLE_KEYED_ENTRY entry , char * buff , size_t buff_size ) { if ( ! ht_entry_is_blob ( entry ) ) return ERR_FAILURE ; if ( entry -> data_size != buff_size ) return ERR_FAILURE ; if ( ! entry -> data ) return ERR_FAILURE ; if ( memcmp ( entry -> data , buff , buff_size ) == 0 ) return ERR_SUCCESS ; return ERR_FAILURE ; }
memory compare hash table keyed entry (binary only compare)
memory compare hash table keyed entry ( binary only compare )
// ensure the entry is a blob // check that the buffer size is less than the length specified for compare // ensure data pointer is set // return true if the buffers match // return indicating failure