From: Ben Pfaff Date: Tue, 3 Nov 2009 20:50:46 +0000 (-0800) Subject: hmap: Fix bug in hmap_replace(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a757a721f675ceab5f0de2731c1de25f479f6c5;p=openvswitch 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". --- diff --git a/lib/hmap.h b/lib/hmap.h index 1809a91b..98088059 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 *