Cleanup incorrect unitialized variable warnings.
authorJustin Pettit <jpettit@nicira.com>
Tue, 25 Aug 2009 23:26:36 +0000 (16:26 -0700)
committerJustin Pettit <jpettit@nicira.com>
Tue, 25 Aug 2009 23:26:36 +0000 (16:26 -0700)
The NetBSD compiler warns that these variables may be used unitialized.
They are not, but this commit gets rid of the warnings.

lib/dpif.c
ofproto/ofproto.c

index e823fa348a5183b6a10a57b07cadde1a2315f0b5..649c2464c8aae38a11a3f0e7f23ab10640ad448f 100644 (file)
@@ -397,7 +397,7 @@ dpif_port_list(const struct dpif *dpif,
                struct odp_port **portsp, size_t *n_portsp)
 {
     struct odp_port *ports;
-    size_t n_ports;
+    size_t n_ports = 0;
     int error;
 
     for (;;) {
index c26cdc2c0af6870a85595d1969badf3efa73992c..dbaa75bc197f96ee360480a4558ec1570dc12509 100644 (file)
@@ -3131,7 +3131,7 @@ send_flow_exp(struct ofproto *p, struct rule *rule,
 {
     struct ofconn *ofconn;
     struct ofconn *prev;
-    struct ofpbuf *buf;
+    struct ofpbuf *buf = NULL;
 
     /* We limit the maximum number of queued flow expirations it by accounting
      * them under the counter for replies.  That works because preventing