MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / dictFind

Function dictFind

deps/hiredis/dict.c:255–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

253}
254
255static dictEntry *dictFind(dict *ht, const void *key) {
256 dictEntry *he;
257 unsigned int h;
258
259 if (ht->size == 0) return NULL;
260 h = dictHashKey(ht, key) & ht->sizemask;
261 he = ht->table[h];
262 while(he) {
263 if (dictCompareHashKeys(ht, key, he->key))
264 return he;
265 he = he->next;
266 }
267 return NULL;
268}
269
270static dictIterator *dictGetIterator(dict *ht) {
271 dictIterator *iter = hi_malloc(sizeof(*iter));

Callers 3

dictReplaceFunction · 0.70
__redisAsyncCommandFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected