Every relop at this point is always EXPR_R_EQ, and therefore it seems that
no code actually examined it, so this doesn't appear to fix an existing
bug, but some code I was working on was affected by the uninitialized
member.

Signed-off-by: Ben Pfaff <b...@ovn.org>
---
 ovn/lib/expr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c
index a28684b..86ea75a 100644
--- a/ovn/lib/expr.c
+++ b/ovn/lib/expr.c
@@ -1802,6 +1802,7 @@ crush_and_string(struct expr *expr, const struct 
expr_symbol *symbol)
     SSET_FOR_EACH (string, &result) {
         sub = xmalloc(sizeof *sub);
         sub->type = EXPR_T_CMP;
+        sub->cmp.relop = EXPR_R_EQ;
         sub->cmp.symbol = symbol;
         sub->cmp.string = xstrdup(string);
         ovs_list_push_back(&expr->andor, &sub->node);
-- 
2.1.3

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to