From ab48643b58bb081cab6408ee2a4aca50cf7ddcc6 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 7 Apr 2010 15:27:35 -0700 Subject: [PATCH] ofproto: Make valgrind happy. The "flags" member of struct odp_flow is not used for adding or deleting flows, but valgrind doesn't know that. By zeroing it out we can suppress spurious warnings. --- ofproto/ofproto.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 995e6b0fe..0746bc983 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -1669,6 +1669,7 @@ do_put_flow(struct ofproto *ofproto, struct rule *rule, int flags, put->flow.key = rule->cr.flow; put->flow.actions = rule->odp_actions; put->flow.n_actions = rule->n_odp_actions; + put->flow.flags = 0; put->flags = flags; return dpif_flow_put(ofproto->dpif, put); } @@ -1764,6 +1765,7 @@ rule_uninstall(struct ofproto *p, struct rule *rule) odp_flow.key = rule->cr.flow; odp_flow.actions = NULL; odp_flow.n_actions = 0; + odp_flow.flags = 0; if (!dpif_flow_del(p->dpif, &odp_flow)) { update_stats(p, rule, &odp_flow.stats); } -- 2.43.0