ofproto: Fix use of uninitialized variable.
authorBen Pfaff <blp@nicira.com>
Wed, 10 Nov 2010 23:12:18 +0000 (15:12 -0800)
committerBen Pfaff <blp@nicira.com>
Wed, 10 Nov 2010 23:12:18 +0000 (15:12 -0800)
My compiler didn't report this but Ethan's did.

Reported-by: Ethan Jackson <ethan@nicira.com>
ofproto/ofproto.c

index e11b15d3b7138af2e0132c7357b5136acef78214..e710c3d42c2c6ff13744e2bfc0418f4afc3f5c5f 100644 (file)
@@ -3676,7 +3676,7 @@ handle_vendor_stats_request(struct ofconn *ofconn,
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_VENDOR);
     }
 
-    if (ntohs(nsm->header.length) < sizeof(struct nicira_stats_msg)) {
+    if (ntohs(osr->header.length) < sizeof(struct nicira_stats_msg)) {
         VLOG_WARN_RL(&rl, "truncated Nicira stats request");
         return ofp_mkerr(OFPET_BAD_REQUEST, OFPBRC_BAD_LEN);
     }