summaryrefslogtreecommitdiffstats
path: root/crypto/params.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/params.c')
-rw-r--r--crypto/params.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/crypto/params.c b/crypto/params.c
index 0cd13e3b81..58a4710e47 100644
--- a/crypto/params.c
+++ b/crypto/params.c
@@ -892,9 +892,8 @@ int OSSL_PARAM_set_utf8_ptr(OSSL_PARAM *p, const char *val)
if (p == NULL)
return 0;
p->return_size = 0;
- if (val == NULL)
- return 0;
- return set_ptr_internal(p, val, OSSL_PARAM_UTF8_PTR, strlen(val) + 1);
+ return set_ptr_internal(p, val, OSSL_PARAM_UTF8_PTR,
+ val == NULL ? 0 : strlen(val) + 1);
}
int OSSL_PARAM_set_octet_ptr(OSSL_PARAM *p, const void *val,
@@ -903,8 +902,6 @@ int OSSL_PARAM_set_octet_ptr(OSSL_PARAM *p, const void *val,
if (p == NULL)
return 0;
p->return_size = 0;
- if (val == NULL)
- return 0;
return set_ptr_internal(p, val, OSSL_PARAM_OCTET_PTR, used_len);
}