diff options
author | Rich Salz <rsalz@akamai.com> | 2015-05-06 14:56:14 -0400 |
---|---|---|
committer | Rich Salz <rsalz@openssl.org> | 2015-05-06 22:37:53 -0400 |
commit | 86885c289580066792415218754bd935b449f170 (patch) | |
tree | 8cab1bdeb50bfee21ce6677d9150c8d385379321 /crypto/x509v3/v3_utl.c | |
parent | dab18ab596acb35eff2545643e25757e4f9cd777 (diff) | |
download | openssl-86885c289580066792415218754bd935b449f170.zip openssl-86885c289580066792415218754bd935b449f170.tar.gz openssl-86885c289580066792415218754bd935b449f170.tar.bz2 |
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 'crypto/x509v3/v3_utl.c')
-rw-r--r-- | crypto/x509v3/v3_utl.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/crypto/x509v3/v3_utl.c b/crypto/x509v3/v3_utl.c index a5fda6f..81227e0 100644 --- a/crypto/x509v3/v3_utl.c +++ b/crypto/x509v3/v3_utl.c @@ -234,14 +234,21 @@ int X509V3_get_value_bool(CONF_VALUE *value, int *asn1_bool) char *btmp; if (!(btmp = value->value)) goto err; - if (!strcmp(btmp, "TRUE") || !strcmp(btmp, "true") - || !strcmp(btmp, "Y") || !strcmp(btmp, "y") - || !strcmp(btmp, "YES") || !strcmp(btmp, "yes")) { + if (strcmp(btmp, "TRUE") == 0 + || strcmp(btmp, "true") == 0 + || strcmp(btmp, "Y") == 0 + || strcmp(btmp, "y") == 0 + || strcmp(btmp, "YES") == 0 + || strcmp(btmp, "yes") == 0) { *asn1_bool = 0xff; return 1; - } else if (!strcmp(btmp, "FALSE") || !strcmp(btmp, "false") - || !strcmp(btmp, "N") || !strcmp(btmp, "n") - || !strcmp(btmp, "NO") || !strcmp(btmp, "no")) { + } + if (strcmp(btmp, "FALSE") == 0 + || strcmp(btmp, "false") == 0 + || strcmp(btmp, "N") == 0 + || strcmp(btmp, "n") == 0 + || strcmp(btmp, "NO") == 0 + || strcmp(btmp, "no") == 0) { *asn1_bool = 0; return 1; } |