Commit 3b8e522ae2 for openssl.org

commit 3b8e522ae2767f3e2cf579499864d19749e03ea0
Author: Joshua Rogers <MegaManSec@users.noreply.github.com>
Date:   Thu Oct 30 03:12:33 2025 +0800

    Remove static int from .bss

    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)

diff --git a/crypto/rand/rand_egd.c b/crypto/rand/rand_egd.c
index ac184b2314..8c07eb11c7 100644
--- a/crypto/rand/rand_egd.c
+++ b/crypto/rand/rand_egd.c
@@ -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;