aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/dh/dh_pmeth.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 /crypto/dh/dh_pmeth.c
parentdab18ab596acb35eff2545643e25757e4f9cd777 (diff)
downloadopenssl-86885c289580066792415218754bd935b449f170.tar.gz
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/dh/dh_pmeth.c')
-rw-r--r--crypto/dh/dh_pmeth.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/dh/dh_pmeth.c b/crypto/dh/dh_pmeth.c
index 1e1036491e..07d74dc929 100644
--- a/crypto/dh/dh_pmeth.c
+++ b/crypto/dh/dh_pmeth.c
@@ -259,12 +259,12 @@ static int pkey_dh_ctrl(EVP_PKEY_CTX *ctx, int type, int p1, void *p2)
static int pkey_dh_ctrl_str(EVP_PKEY_CTX *ctx,
const char *type, const char *value)
{
- if (!strcmp(type, "dh_paramgen_prime_len")) {
+ if (strcmp(type, "dh_paramgen_prime_len") == 0) {
int len;
len = atoi(value);
return EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len);
}
- if (!strcmp(type, "dh_rfc5114")) {
+ if (strcmp(type, "dh_rfc5114") == 0) {
DH_PKEY_CTX *dctx = ctx->data;
int len;
len = atoi(value);
@@ -273,17 +273,17 @@ static int pkey_dh_ctrl_str(EVP_PKEY_CTX *ctx,
dctx->rfc5114_param = len;
return 1;
}
- if (!strcmp(type, "dh_paramgen_generator")) {
+ if (strcmp(type, "dh_paramgen_generator") == 0) {
int len;
len = atoi(value);
return EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, len);
}
- if (!strcmp(type, "dh_paramgen_subprime_len")) {
+ if (strcmp(type, "dh_paramgen_subprime_len") == 0) {
int len;
len = atoi(value);
return EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len);
}
- if (!strcmp(type, "dh_paramgen_type")) {
+ if (strcmp(type, "dh_paramgen_type") == 0) {
int typ;
typ = atoi(value);
return EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ);