lib/ccmap.c
/* Searches 'ccmap' for a node with the specified 'hash'.  If one is
 * found, returns the count associated with it, otherwise zero.
 */
Searches 'ccmap' for a node with the specified 'hash'.  If one is
found, returns the count associated with it, otherwise zero.
Searches ' ccmap ' for a node with the specified ' hash ' . If one is found returns the count associated with it otherwise zero .
uint32_t
ccmap_find(const struct ccmap *ccmap, uint32_t hash)
{
    const struct ccmap_impl *impl = ccmap_get_impl(ccmap);
    uint32_t h = rehash(impl, hash);
    uint32_t count;
    count = ccmap_find_in_bucket(&impl->buckets[h & impl->mask], hash);
    if (!count) {
        h = other_hash(h);
        count = ccmap_find_in_bucket(&impl->buckets[h & impl->mask], hash);
    }
    return count;
}
uint32_t ccmap_find ( const struct ccmap * ccmap , uint32_t hash ) { const struct ccmap_impl * impl = ccmap_get_impl ( ccmap ) ; uint32_t h = rehash ( impl , hash ) ; uint32_t count ; count = ccmap_find_in_bucket ( & impl -> buckets [ h & impl -> mask ] , hash ) ; if ( ! count ) { h = other_hash ( h ) ; count = ccmap_find_in_bucket ( & impl -> buckets [ h & impl -> mask ] , hash ) ; } return count ; }
Searches 'ccmap' for a node with the specified 'hash'.
Searches ' ccmap ' for a node with the specified ' hash ' .