summaryrefslogtreecommitdiff
path: root/ovn/lib
diff options
context:
space:
mode:
authorBen Pfaff <blp@ovn.org>2016-08-02 22:46:18 -0700
committerBen Pfaff <blp@ovn.org>2016-08-08 11:00:46 -0700
commit6fdd4feedf71a0f687e086fc5b1622106eb48024 (patch)
treee9437912f727c6d439dd3b23e1a0b68f1cdc73ec /ovn/lib
parent46baac6df441f3db4dceb9c9d332f0069187cb65 (diff)
downloadopenvswitch-6fdd4feedf71a0f687e086fc5b1622106eb48024.tar.gz
expr: Initialize 'relop' of allocated exprs in crush_and_string().
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 <blp@ovn.org> Acked-by: Ryan Moats <rmoats@us.ibm.com>
Diffstat (limited to 'ovn/lib')
-rw-r--r--ovn/lib/expr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ovn/lib/expr.c b/ovn/lib/expr.c
index a28684b47..86ea75a81 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);