summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2015-05-06 14:56:14 -0400
committerRich Salz <rsalz@openssl.org>2015-05-06 22:37:53 -0400
commit86885c289580066792415218754bd935b449f170 (patch)
tree8cab1bdeb50bfee21ce6677d9150c8d385379321 /demos
parentdab18ab596acb35eff2545643e25757e4f9cd777 (diff)
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.c2
-rw-r--r--demos/bio/client-conf.c2
-rw-r--r--demos/bio/server-arg.c2
-rw-r--r--demos/bio/server-conf.c2
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);