git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Prepare for post-2.2.0 (2.2.90).
[sliver-openvswitch.git]
/
lib
/
hmap.c
diff --git
a/lib/hmap.c
b/lib/hmap.c
index
a559a77
..
542d8b5
100644
(file)
--- a/
lib/hmap.c
+++ b/
lib/hmap.c
@@
-114,7
+114,7
@@
resize(struct hmap *hmap, size_t new_mask, const char *where)
if (count > 5) {
static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(10, 10);
COVERAGE_INC(hmap_pathological);
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);
}
}
where, count, hmap->n, hmap->mask + 1);
}
}
@@
-214,8
+214,8
@@
hmap_random_node(const struct hmap *hmap)
size_t n, i;
/* Choose a random non-empty bucket. */
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;
}
if (bucket) {
break;
}