summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_conf.c
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 /ssl/ssl_conf.c
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 'ssl/ssl_conf.c')
-rw-r--r--ssl/ssl_conf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c
index c920af5999..881c351f89 100644
--- a/ssl/ssl_conf.c
+++ b/ssl/ssl_conf.c
@@ -251,13 +251,13 @@ static int cmd_ECDHParameters(SSL_CONF_CTX *cctx, const char *value)
onoff = 0;
value++;
}
- if (!strcasecmp(value, "automatic")) {
+ if (strcasecmp(value, "automatic") == 0) {
if (onoff == -1)
onoff = 1;
} else if (onoff != -1)
return 0;
} else if (cctx->flags & SSL_CONF_FLAG_CMDLINE) {
- if (!strcmp(value, "auto"))
+ if (strcmp(value, "auto") == 0)
onoff = 1;
}
@@ -546,11 +546,11 @@ static const ssl_conf_cmd_tbl *ssl_conf_cmd_lookup(SSL_CONF_CTX *cctx,
for (i = 0, t = ssl_conf_cmds; i < OSSL_NELEM(ssl_conf_cmds); i++, t++) {
if (ssl_conf_cmd_allowed(cctx, t)) {
if (cctx->flags & SSL_CONF_FLAG_CMDLINE) {
- if (t->str_cmdline && !strcmp(t->str_cmdline, cmd))
+ if (t->str_cmdline && strcmp(t->str_cmdline, cmd) == 0)
return t;
}
if (cctx->flags & SSL_CONF_FLAG_FILE) {
- if (t->str_file && !strcasecmp(t->str_file, cmd))
+ if (t->str_file && strcasecmp(t->str_file, cmd) == 0)
return t;
}
}