static entry find_entry (hashtable ht, void *key, unsigned int hash, int remove) { entry e; entry *prev; unsigned int index; index = INDEX_FOR (hash, ht->tablelength); for (prev = &(ht->table[index]); (e = *prev) ; prev = &e->next) { if (hash != e->hash) continue; if (key != e->key) if (!ht->eqfn (key, e->key, hash)) continue; if (remove) { *prev = e->next; ht->entrycount--; free_entry (ht->pool, e); } return e; } return NULL; }