[ovs-dev] [PATCH] ovs-ofctl: Use strchr() instead of strstr().

Ethan Jackson ethan at nicira.com
Thu Jul 21 18:48:06 UTC 2011


Sems Fine.

Ethan

On Thu, Jul 21, 2011 at 11:12, Ben Pfaff <blp at nicira.com> wrote:
> It's the right tool for the job.  Potentially faster, too.
> ---
>  utilities/ovs-ofctl.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/utilities/ovs-ofctl.c b/utilities/ovs-ofctl.c
> index a94bde8..7cdf42d 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)) {
> --
> 1.7.4.4
>
> _______________________________________________
> dev mailing list
> dev at openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>



More information about the dev mailing list