From: Ben Pfaff Date: Wed, 7 Apr 2010 22:27:35 +0000 (-0700) Subject: ofproto: Make valgrind happy. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ab48643b58bb081cab6408ee2a4aca50cf7ddcc6;p=openvswitch 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. --- diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 995e6b0f..0746bc98 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); }