base/hash/m_hashtable.c
/*! Searches the chained entries of a hash index for a matching key.
 *  \param h Pointer to the h
 *  \param idx       Hash index being searched
 *  \param key       key being searched for
 *  \return Pointer to h bucket containing a match, or NULL if no
 *          match found */
Searches the chained entries of a hash index for a matching key.
\param h Pointer to the h
\param idx       Hash index being searched
\param key       key being searched for
\return Pointer to h bucket containing a match, or NULL if no
match found
Searches the chained entries of a hash index for a matching key . \ param h Pointer to the h \ param idx Hash index being searched \ param key key being searched for \ return Pointer to h bucket containing a match or NULL if no match found
static struct M_hashtable_bucket *M_hashtable_get_match(const M_hashtable_t *h, size_t idx, const void *key)
{
	struct M_hashtable_bucket *entry;
	entry = &h->buckets[idx];
	if (entry->key == NULL)
		return NULL;
	while (entry != NULL) {
		if (h->key_equality(&entry->key, &key, NULL) == 0)
			return entry;
		entry = entry->next;
	}
	return NULL;
}
static struct M_hashtable_bucket * M_hashtable_get_match ( const M_hashtable_t * h , size_t idx , const void * key ) { struct M_hashtable_bucket * entry ; entry = & h -> buckets [ idx ] ; if ( entry -> key == NULL ) return NULL ; while ( entry != NULL ) { if ( h -> key_equality ( & entry -> key , & key , NULL ) == 0 ) return entry ; entry = entry -> next ; } return NULL ; }
Searches the chained entries of a hash index for a matching key.
Searches the chained entries of a hash index for a matching key .