Fix a misuse of NULL check
authorWeiguo Li <liwg06@foxmail.com>
Mon, 27 Dec 2021 16:05:54 +0000 (00:05 +0800)
committerTomas Mraz <tomas@openssl.org>
Wed, 29 Dec 2021 15:01:28 +0000 (16:01 +0100)
Fixes: #17356
CLA: trivial

Reviewed-by: Ben Kaduk <kaduk@mit.edu>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17357)

crypto/rand/rand_egd.c

index bb862f61ad0b515f8213d14f20639d6053e0ab03..4ea6846ccbd032d211c2db92d5b5c500419d0a1d 100644 (file)
@@ -80,7 +80,7 @@ int hpns_socket(int family,
 #  define AF_UNIX_PORTABILITY    "$ZAFN2"
 #  define AF_UNIX_COMPATIBILITY  "$ZPLS"
 
-    if (!_arg_present(transport) || transport != NULL || transport[0] == '\0')
+    if (!_arg_present(transport) || transport == NULL || transport[0] == '\0')
         return socket(family, type, protocol);
 
     socket_transport_name_get(AF_UNIX, current_transport, 20);