From: Ben Pfaff Date: Thu, 21 Jul 2011 22:39:08 +0000 (-0700) Subject: ofproto-dpif: Initialize 'may_enable' at port construction time. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5ffa7f2fedbd3f9a4156f78e5fe344cc51dbedf;p=openvswitch ofproto-dpif: Initialize 'may_enable' at port construction time. Silences a valgrind warning: ==640== Conditional jump or move depends on uninitialised value(s) ==640== at 0x808E623: run (ofproto-dpif.c:1444) ==640== by 0x8086593: ofproto_run (ofproto.c:755) ==640== by 0x806EB80: bridge_run (bridge.c:1397) ==640== by 0x806F66C: main (ovs-vswitchd.c:90) --- diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c index e39f6159..c88569cf 100644 --- a/ofproto/ofproto-dpif.c +++ b/ofproto/ofproto-dpif.c @@ -714,6 +714,7 @@ port_construct(struct ofport *port_) port->bundle = NULL; port->cfm = NULL; port->tag = tag_create_random(); + port->may_enable = true; if (ofproto->sflow) { dpif_sflow_add_port(ofproto->sflow, port->odp_port,