diff options
-rw-r--r-- | src/test/test_util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c index 7d02fed853..1edfaa9ead 100644 --- a/src/test/test_util.c +++ b/src/test/test_util.c @@ -5101,14 +5101,14 @@ is_there_a_localhost(void) s = tor_open_socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); tor_assert(SOCKET_OK(s)); - struct sockaddr_in sin; - memset(&sin, 0, sizeof(sin)); - sin.sin_family = AF_INET; - sin.sin_addr.s_addr = htonl(0x7f000001); - sin.sin_port = 0; + struct sockaddr_in s_in; + memset(&s_in, 0, sizeof(s_in)); + s_in.sin_family = AF_INET; + s_in.sin_addr.s_addr = htonl(0x7f000001); + s_in.sin_port = 0; int result = 0; - if (bind(s, (void*)&sin, sizeof(sin)) == 0) { + if (bind(s, (void*)&s_in, sizeof(s_in)) == 0) { result = 1; } tor_close_socket(s); |