[tor-commits] [tor/master] Whoops. Cant call sockaddr_in a "sin", since sin() is a thing.
nickm at torproject.org
nickm at torproject.org
Sun Sep 11 21:59:29 UTC 2016
commit d5d29cd5a2a0e09afb199f180619cf7a5172f7f9
Author: Nick Mathewson <nickm at torproject.org>
Date: Sun Sep 11 17:59:25 2016 -0400
Whoops. Cant call sockaddr_in a "sin", since sin() is a thing.
---
src/test/test_util.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 7d02fed..1edfaa9 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);
More information about the tor-commits
mailing list