From: Justin Pettit Date: Tue, 25 Aug 2009 23:26:36 +0000 (-0700) Subject: Cleanup incorrect unitialized variable warnings. X-Git-Tag: v0.99.0~127 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=b9b0ce61119594b1fe6c5f91f62b7561d6bcf01d;p=sliver-openvswitch.git Cleanup incorrect unitialized variable warnings. The NetBSD compiler warns that these variables may be used unitialized. They are not, but this commit gets rid of the warnings. --- diff --git a/lib/dpif.c b/lib/dpif.c index e823fa348..649c2464c 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -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 (;;) { diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index c26cdc2c0..dbaa75bc1 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -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