summaryrefslogtreecommitdiff
path: root/lib/hmap.h
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2009-11-03 12:50:46 -0800
committerBen Pfaff <blp@nicira.com>2009-11-04 15:01:02 -0800
commit9a757a721f675ceab5f0de2731c1de25f479f6c5 (patch)
treeaf2c980baadafc2ff3fbea49b0e4414687cdc1af /lib/hmap.h
parent44528c546359a95c57e8a0e4b3703c5086b15f24 (diff)
downloadopenvswitch-9a757a721f675ceab5f0de2731c1de25f479f6c5.tar.gz
hmap: Fix bug in hmap_replace().
When hmap_replace() replaces one hash table node by another, it must ensure that any nodes following the old node also follow the new node, by copying the "next" pointer from "old" to "new".
Diffstat (limited to 'lib/hmap.h')
-rw-r--r--lib/hmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/hmap.h b/lib/hmap.h
index 1809a91b5..980880591 100644
--- a/lib/hmap.h
+++ b/lib/hmap.h
@@ -190,6 +190,7 @@ hmap_replace(struct hmap *hmap,
}
*bucket = new;
new->hash = old->hash;
+ new->next = old->next;
}
static inline struct hmap_node *