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 e39f6159642891d8a7189ea8b66a7fdd50e8ea05..c88569cf363ebe2dfed0119049a75b4341734d6b 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,