ofp-util: Rename ofputil_port_from_string() variable to avoid hiding param.
authorBen Pfaff <blp@nicira.com>
Thu, 24 Jan 2013 21:56:10 +0000 (13:56 -0800)
committerBen Pfaff <blp@nicira.com>
Fri, 1 Feb 2013 22:26:51 +0000 (14:26 -0800)
This function has a parameter 's' and a local variable 's', so rename the
local variable to reduce confusion.

Found by Coverity.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Ethan Jackson <ethan@nicira.com>
lib/ofp-util.c

index c66cd40..4098350 100644 (file)
@@ -4115,14 +4115,14 @@ ofputil_port_from_string(const char *s, uint16_t *portp)
             *portp = port32;
             return true;
         } else if (port32 <= OFPP_LAST_RESV) {
-            struct ds s;
+            struct ds msg;
 
-            ds_init(&s);
-            ofputil_format_port(port32, &s);
+            ds_init(&msg);
+            ofputil_format_port(port32, &msg);
             VLOG_WARN_ONCE("referring to port %s as %u is deprecated for "
                            "compatibility with future versions of OpenFlow",
-                           ds_cstr(&s), port32);
-            ds_destroy(&s);
+                           ds_cstr(&msg), port32);
+            ds_destroy(&msg);
 
             *portp = port32;
             return true;