>From Ben Pfaff [email protected]

Coverity reports incorrect expression for HMAP_FOR_EACH_WITH_HASH macro
This patch fixes this issue
"make check" passes for this change
Coverity reports 80 errors resolved

Signed-off-by: Usman Ansari <[email protected]>

---

include/openvswitch/hmap.h

1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/include/openvswitch/hmap.h b/include/openvswitch/hmap.h

index 8aea9c2..f48359f 100644

--- a/include/openvswitch/hmap.h

+++ b/include/openvswitch/hmap.h

@@ -136,7 +136,7 @@ struct hmap_node *hmap_random_node(const struct hmap *);

  */

 #define HMAP_FOR_EACH_WITH_HASH(NODE, MEMBER, HASH, HMAP)               \

     for (INIT_CONTAINER(NODE, hmap_first_with_hash(HMAP, HASH), MEMBER); \

-         (NODE != OBJECT_CONTAINING(NULL, NODE, MEMBER)) || (NODE = NULL);
\

+         (NODE != OBJECT_CONTAINING(NULL, NODE, MEMBER)) || ((NODE =
NULL), false); \

          ASSIGN_CONTAINER(NODE, hmap_next_with_hash(&(NODE)->MEMBER),   \

                           MEMBER))

 #define HMAP_FOR_EACH_IN_BUCKET(NODE, MEMBER, HASH, HMAP)               \

---
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to