]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/conf/conf_mod.c
Explicitly test against NULL; do not use !p or similar
[thirdparty/openssl.git] / crypto / conf / conf_mod.c
index 56b19467a28b3b58c4ef3a7a3d4db85c240b2787..86924c1bffe301ed71e63dfcf736312942e92957 100644 (file)
@@ -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)