lib/hmap.c
/* Removes all node from 'hmap', leaving it ready to accept more nodes.  Does
 * not free memory allocated for 'hmap'.
 *
 * This function is appropriate when 'hmap' will soon have about as many
 * elements as it did before.  If 'hmap' will likely have fewer elements than
 * before, use hmap_destroy() followed by hmap_init() to save memory and
 * iteration time. */
Removes all node from 'hmap', leaving it ready to accept more nodes.  Does
not free memory allocated for 'hmap'.

This function is appropriate when 'hmap' will soon have about as many
elements as it did before.  If 'hmap' will likely have fewer elements than
before, use hmap_destroy() followed by hmap_init() to save memory and
iteration time.
Removes all node from ' hmap ' leaving it ready to accept more nodes . Does not free memory allocated for ' hmap ' . This function is appropriate when ' hmap ' will soon have about as many elements as it did before . If ' hmap ' will likely have fewer elements than before use hmap_destroy () followed by hmap_init () to save memory and iteration time .
void
hmap_clear(struct hmap *hmap)
{
    if (hmap->n > 0) {
        hmap->n = 0;
        memset(hmap->buckets, 0, (hmap->mask + 1) * sizeof *hmap->buckets);
    }
}
void hmap_clear ( struct hmap * hmap ) { if ( hmap -> n > 0 ) { hmap -> n = 0 ; memset ( hmap -> buckets , 0 , ( hmap -> mask + 1 ) * sizeof * hmap -> buckets ) ; } }
Removes all node from 'hmap', leaving it ready to accept more nodes.
Removes all node from ' hmap ' leaving it ready to accept more nodes .