library/src/datastructures/BP-HashTable.cc
// memory compare hash table keyed entry (binary only compare).  Returns ERR_SUCCESS if
// the keys match (are exactly the same).  Returns ERR_FAILURE if keys differ at all.
memory compare hash table keyed entry (binary only compare).  Returns ERR_SUCCESS if
the keys match (are exactly the same).  Returns ERR_FAILURE if keys differ at all.
memory compare hash table keyed entry ( binary only compare ) . Returns ERR_SUCCESS if the keys match ( are exactly the same ) . Returns ERR_FAILURE if keys differ at all .
BP_ERROR_T ht_memmatch_key
(
		P_BP_HASH_TABLE_KEYED_ENTRY entry,
		char  *buff,
		size_t buff_size
)
{
	if(!buff)
		return ERR_FAILURE;
	if(!buff_size)
		return ERR_FAILURE;
	if(!entry->key)
		return ERR_FAILURE;
	if(bpstrlen(entry->key) != buff_size)
		return ERR_FAILURE;
	if(memcmp(entry->key, buff, buff_size) == 0)
		return ERR_SUCCESS;
	return ERR_FAILURE;
}
BP_ERROR_T ht_memmatch_key ( P_BP_HASH_TABLE_KEYED_ENTRY entry , char * buff , size_t buff_size ) { if ( ! buff ) return ERR_FAILURE ; if ( ! buff_size ) return ERR_FAILURE ; if ( ! entry -> key ) return ERR_FAILURE ; if ( bpstrlen ( entry -> key ) != buff_size ) return ERR_FAILURE ; if ( memcmp ( entry -> key , 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 ) .
// basic null checks // check that the buffer size is less than the length specified for compare // return true if the buffers match // return indicating failure