Skip to content

Commit

Permalink
cmap: Fix bug in CMAP_FOR_EACH_WITH_HASH_PROTECTED.
Browse files Browse the repository at this point in the history
cmap_find_locked() should be cmap_find_protected().

This does not fix a user-visible bug because this macro did not have any
users.

Signed-off-by: zhangliping <zhangliping02@baidu.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Mark Michelson <mmichels@redhat.com>
  • Loading branch information
zhangliping authored and blp committed Feb 26, 2018
1 parent c381bca commit 48b1008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cmap.h
Expand Up @@ -140,7 +140,7 @@ size_t cmap_replace(struct cmap *, struct cmap_node *old_node,
#define CMAP_FOR_EACH_WITH_HASH(NODE, MEMBER, HASH, CMAP) \
CMAP_NODE_FOR_EACH(NODE, MEMBER, cmap_find(CMAP, HASH))
#define CMAP_FOR_EACH_WITH_HASH_PROTECTED(NODE, MEMBER, HASH, CMAP) \
CMAP_NODE_FOR_EACH_PROTECTED(NODE, MEMBER, cmap_find_locked(CMAP, HASH))
CMAP_NODE_FOR_EACH_PROTECTED(NODE, MEMBER, cmap_find_protected(CMAP, HASH))

const struct cmap_node *cmap_find(const struct cmap *, uint32_t hash);
struct cmap_node *cmap_find_protected(const struct cmap *, uint32_t hash);
Expand Down

0 comments on commit 48b1008

Please sign in to comment.