ofproto-dpif: Initialize 'may_enable' at port construction time.
authorBen Pfaff <blp@nicira.com>
Thu, 21 Jul 2011 22:39:08 +0000 (15:39 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 22 Jul 2011 22:03:40 +0000 (15:03 -0700)
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)

ofproto/ofproto-dpif.c

index e39f615..c88569c 100644 (file)
@@ -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,