From: Ben Pfaff Date: Thu, 21 Jul 2011 18:12:45 +0000 (-0700) Subject: ovs-ofctl: Use strchr() instead of strstr(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a27375ead10be81e7122aaff8bb2a17c7c202a7;p=openvswitch ovs-ofctl: Use strchr() instead of strstr(). It's the right tool for the job. Potentially faster, too. --- diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c index a94bde8e..7cdf42db 100644 --- a/utilities/ovs-ofctl.c +++ b/utilities/ovs-ofctl.c @@ -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)) {