From 3a27375ead10be81e7122aaff8bb2a17c7c202a7 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Thu, 21 Jul 2011 11:12:45 -0700 Subject: [PATCH] ovs-ofctl: Use strchr() instead of strstr(). It's the right tool for the job. Potentially faster, too. --- utilities/ovs-ofctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)) { -- 2.30.2