summaryrefslogtreecommitdiffstats
path: root/crypto/conf/conf_mod.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2019-09-16 15:28:57 -0400
committerRichard Levitte <levitte@openssl.org>2019-10-09 21:32:15 +0200
commit12a765a5235f181c2f4992b615eb5f892c368e88 (patch)
tree67ece1a3fb210bd4895aea73649773fc912a60d6 /crypto/conf/conf_mod.c
parent3a4e43de473ee80347036d78163889b6b1221210 (diff)
Explicitly test against NULL; do not use !p or similar
Also added blanks lines after declarations in a couple of places. Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org> Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9916)
Diffstat (limited to 'crypto/conf/conf_mod.c')
-rw-r--r--crypto/conf/conf_mod.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/crypto/conf/conf_mod.c b/crypto/conf/conf_mod.c
index 56b19467a2..86924c1bff 100644
--- a/crypto/conf/conf_mod.c
+++ b/crypto/conf/conf_mod.c
@@ -198,19 +198,20 @@ static CONF_MODULE *module_load_dso(const CONF *cnf,
const char *path = NULL;
int errcode = 0;
CONF_MODULE *md;
+
/* Look for alternative path in module section */
path = NCONF_get_string(cnf, value, "path");
- if (!path) {
+ if (path == NULL) {
ERR_clear_error();
path = name;
}
dso = DSO_load(NULL, path, NULL, 0);
- if (!dso) {
+ if (dso == NULL) {
errcode = CONF_R_ERROR_LOADING_DSO;
goto err;
}
ifunc = (conf_init_func *)DSO_bind_func(dso, DSO_mod_init_name);
- if (!ifunc) {
+ if (ifunc == NULL) {
errcode = CONF_R_MISSING_INIT_FUNCTION;
goto err;
}
@@ -218,7 +219,7 @@ static CONF_MODULE *module_load_dso(const CONF *cnf,
/* All OK, add module */
md = module_add(dso, name, ifunc, ffunc);
- if (!md)
+ if (md == NULL)
goto err;
return md;
@@ -533,7 +534,7 @@ int CONF_parse_list(const char *list_, int sep, int nospc,
lstart++;
}
p = strchr(lstart, sep);
- if (p == lstart || !*lstart)
+ if (p == lstart || *lstart == '\0')
ret = list_cb(NULL, 0, arg);
else {
if (p)