ovs-ofctl: Use strchr() instead of strstr().
authorBen Pfaff <blp@nicira.com>
Thu, 21 Jul 2011 18:12:45 +0000 (11:12 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 21 Jul 2011 18:12:45 +0000 (11:12 -0700)
It's the right tool for the job.  Potentially faster, too.

utilities/ovs-ofctl.c

index a94bde8e225b965c4f03a2c35a7dbe03f077e532..7cdf42db6e66382e1bf54f32907a54ba0c4546dc 100644 (file)
@@ -233,7 +233,7 @@ open_vconn__(const char *name, const char *default_suffix,
     free(datapath_name);
     free(datapath_type);
 
-    if (strstr(name, ":")) {
+    if (strchr(name, ':')) {
         run(vconn_open_block(name, OFP_VERSION, vconnp),
             "connecting to %s", name);
     } else if (!stat(name, &s) && S_ISSOCK(s.st_mode)) {