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>
diff --git a/demos/bio/client-arg.c b/demos/bio/client-arg.c
index dc354ca..8507e04 100644
--- a/demos/bio/client-arg.c
+++ b/demos/bio/client-arg.c
@@ -38,7 +38,7 @@
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 150e7fc..b75088a 100644
--- a/demos/bio/client-conf.c
+++ b/demos/bio/client-conf.c
@@ -53,7 +53,7 @@
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 4f65227..b188f6a 100644
--- a/demos/bio/server-arg.c
+++ b/demos/bio/server-arg.c
@@ -52,7 +52,7 @@
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 5355839..cc9fe8a 100644
--- a/demos/bio/server-conf.c
+++ b/demos/bio/server-conf.c
@@ -67,7 +67,7 @@
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);