From db82fa2ac4ac9bed62e82d96561964aee9969d6b Mon Sep 17 00:00:00 2001 From: Weiguo Li Date: Tue, 28 Dec 2021 00:05:54 +0800 Subject: Fix a misuse of NULL check Fixes: #17356 CLA: trivial Reviewed-by: Ben Kaduk Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/17357) (cherry picked from commit ff7cdc15875293a330831a80d83edbafd25a9d36) --- crypto/rand/rand_egd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/rand/rand_egd.c b/crypto/rand/rand_egd.c index dc1833169c..2067ececaf 100644 --- a/crypto/rand/rand_egd.c +++ b/crypto/rand/rand_egd.c @@ -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); -- cgit v1.2.3