summaryrefslogtreecommitdiffstats
path: root/crypto/cmac
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 /crypto/cmac
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 'crypto/cmac')
-rw-r--r--crypto/cmac/cm_pmeth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/cmac/cm_pmeth.c b/crypto/cmac/cm_pmeth.c
index 389ae5da84..013ac57094 100644
--- a/crypto/cmac/cm_pmeth.c
+++ b/crypto/cmac/cm_pmeth.c
@@ -157,18 +157,18 @@ static int pkey_cmac_ctrl_str(EVP_PKEY_CTX *ctx,
if (!value) {
return 0;
}
- if (!strcmp(type, "key")) {
+ if (strcmp(type, "key") == 0) {
void *p = (void *)value;
return pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_SET_MAC_KEY, strlen(p), p);
}
- if (!strcmp(type, "cipher")) {
+ if (strcmp(type, "cipher") == 0) {
const EVP_CIPHER *c;
c = EVP_get_cipherbyname(value);
if (!c)
return 0;
return pkey_cmac_ctrl(ctx, EVP_PKEY_CTRL_CIPHER, -1, (void *)c);
}
- if (!strcmp(type, "hexkey")) {
+ if (strcmp(type, "hexkey") == 0) {
unsigned char *key;
int r;
long keylen;