MCPcopy Create free account
hub / github.com/acl-dev/acl / debug_htable_find

Function debug_htable_find

lib_acl/src/stdlib/debug/debug_htable.c:191–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

189/* debug_htable_find - lookup value */
190
191char *debug_htable_find(DEBUG_HTABLE *table, const char *key)
192{
193 DEBUG_HTABLE_INFO *ht;
194 unsigned n;
195
196 if (table == NULL || key == NULL)
197 return (NULL);
198
199 n = table->hash_fn(key, strlen(key));
200
201 n = n % table->size;
202
203 for (ht = table->data[n]; ht; ht = ht->next) {
204 if (STREQ(key, ht->key)) {
205 return (ht->value);
206 }
207 }
208
209 return (NULL);
210}
211
212/* debug_htable_locate - lookup entry */
213

Callers 2

acl_debug_reallocFunction · 0.85
acl_debug_freeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…