]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Remove static int from .bss
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Wed, 29 Oct 2025 19:12:33 +0000 (03:12 +0800)
committerNeil Horman <nhorman@openssl.org>
Thu, 12 Mar 2026 18:19:15 +0000 (14:19 -0400)
Signed-off-by: Joshua Rogers <MegaManSec@users.noreply.github.com>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Thu Mar 12 18:22:02 2026
(Merged from https://github.com/openssl/openssl/pull/28909)

crypto/rand/rand_egd.c

index ac184b2314efdfc95f0ab982f15620d4164b5601..8c07eb11c77a63bfba218e9b22793bd60dc280e5 100644 (file)
@@ -104,6 +104,7 @@ static int hpns_connect_attempt = 0;
 
 #endif /* defined(OPENSSL_SYS_HPNS) */
 
+
 int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
 {
     FILE *fp = NULL;
@@ -111,7 +112,7 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
     int mybuffer, ret = -1, i, numbytes, fd = -1;
     unsigned char tempbuf[255];
 #if defined(OPENSSL_SYS_TANDEM)
-    hpns_connect_attempt = 0;
+    int hpns_connect_attempt = 0;
 #endif
 
     if (bytes <= 0 || bytes > (int)sizeof(tempbuf))
@@ -134,12 +135,8 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
 
     /* Try to connect */
     for (;;) {
-        if (connect(fd, (struct sockaddr *)&addr, i) == 0) {
-#if defined(OPENSSL_SYS_TANDEM)
-            hpns_connect_attempt = 0;
-#endif
+        if (connect(fd, (struct sockaddr *)&addr, i) == 0)
             break;
-        }
 # ifdef EISCONN
         if (errno == EISCONN)
             break;