diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-06 20:56:14 +0200 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-07 04:37:53 +0200 |
commit | 86885c289580066792415218754bd935b449f170 (patch) | |
tree | 8cab1bdeb50bfee21ce6677d9150c8d385379321 /demos | |
parent | Digest cached records if not sending a certificate. (diff) | |
download | openssl-86885c289580066792415218754bd935b449f170.tar.xz openssl-86885c289580066792415218754bd935b449f170.zip |
Use "==0" instead of "!strcmp" etc
For the various string-compare routines (strcmp, strcasecmp, str.*cmp)
use "strcmp()==0" instead of "!strcmp()"
Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'demos')
-rw-r--r-- | demos/bio/client-arg.c | 2 | ||||
-rw-r--r-- | demos/bio/client-conf.c | 2 | ||||
-rw-r--r-- | demos/bio/server-arg.c | 2 | ||||
-rw-r--r-- | demos/bio/server-conf.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/demos/bio/client-arg.c b/demos/bio/client-arg.c index dc354cae06..8507e04f49 100644 --- a/demos/bio/client-arg.c +++ b/demos/bio/client-arg.c @@ -38,7 +38,7 @@ int main(int argc, char **argv) if (rv > 0) continue; /* Otherwise application specific argument processing */ - if (!strcmp(*args, "-connect")) { + if (strcmp(*args, "-connect") == 0) { connect_str = args[1]; if (connect_str == NULL) { fprintf(stderr, "Missing -connect argument\n"); diff --git a/demos/bio/client-conf.c b/demos/bio/client-conf.c index 150e7fcf83..b75088a758 100644 --- a/demos/bio/client-conf.c +++ b/demos/bio/client-conf.c @@ -53,7 +53,7 @@ int main(int argc, char **argv) ERR_print_errors_fp(stderr); goto end; } - if (!strcmp(cnf->name, "Connect")) { + if (strcmp(cnf->name, "Connect") == 0) { connect_str = cnf->value; } else { fprintf(stderr, "Unknown configuration option %s\n", cnf->name); diff --git a/demos/bio/server-arg.c b/demos/bio/server-arg.c index 4f65227e40..b188f6a4ed 100644 --- a/demos/bio/server-arg.c +++ b/demos/bio/server-arg.c @@ -52,7 +52,7 @@ int main(int argc, char *argv[]) if (rv > 0) continue; /* Otherwise application specific argument processing */ - if (!strcmp(*args, "-port")) { + if (strcmp(*args, "-port") == 0) { port = args[1]; if (port == NULL) { fprintf(stderr, "Missing -port argument\n"); diff --git a/demos/bio/server-conf.c b/demos/bio/server-conf.c index 5355839f4f..cc9fe8a828 100644 --- a/demos/bio/server-conf.c +++ b/demos/bio/server-conf.c @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) ERR_print_errors_fp(stderr); goto err; } - if (!strcmp(cnf->name, "Port")) { + if (strcmp(cnf->name, "Port") == 0) { port = cnf->value; } else { fprintf(stderr, "Unknown configuration option %s\n", cnf->name); |