crypto/engine/eng_list.c: compare getenv rv to NULL instead of 0
authorPatrick Steuer <patrick.steuer@de.ibm.com>
Mon, 18 Dec 2017 21:47:01 +0000 (22:47 +0100)
committerRich Salz <rsalz@openssl.org>
Mon, 8 Jan 2018 18:22:16 +0000 (13:22 -0500)
Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4958)

crypto/engine/eng_list.c

index b335ac1651dea36ecdbc5d927ace193ef8996f83..53e138d5cb28da14aa80370f40bae60721521813 100644 (file)
@@ -317,7 +317,7 @@ ENGINE *ENGINE_by_id(const char *id)
      * Prevent infinite recursion if we're looking for the dynamic engine.
      */
     if (strcmp(id, "dynamic")) {
-        if ((load_dir = getenv("OPENSSL_ENGINES")) == 0)
+        if ((load_dir = getenv("OPENSSL_ENGINES")) == NULL)
             load_dir = ENGINESDIR;
         iterator = ENGINE_by_id("dynamic");
         if (!iterator || !ENGINE_ctrl_cmd_string(iterator, "ID", id, 0) ||