if (count > 5) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(10, 10);
COVERAGE_INC(hmap_pathological);
- VLOG_DBG_RL(&rl, "%s: %d nodes in bucket (%zu nodes, %zu buckets)",
+ VLOG_DBG_RL(&rl, "%s: %d nodes in bucket (%"PRIuSIZE" nodes, %"PRIuSIZE" buckets)",
where, count, hmap->n, hmap->mask + 1);
}
}
size_t n, i;
/* Choose a random non-empty bucket. */
- for (i = random_uint32(); ; i++) {
- bucket = hmap->buckets[i & hmap->mask];
+ for (;;) {
+ bucket = hmap->buckets[random_uint32() & hmap->mask];
if (bucket) {
break;
}