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 e823fa3..649c246 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 c26cdc2..dbaa75b 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