diff options
author | Nick Mathewson <nickm@torproject.org> | 2016-09-11 17:59:25 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2016-09-11 17:59:25 -0400 |
commit | d5d29cd5a2a0e09afb199f180619cf7a5172f7f9 (patch) | |
tree | 31db7f51e9df28b4ffff73e1410978f05d183b85 | |
parent | ccea2a5aa92f3d6eae62877da8291a8c59d15adb (diff) | |
download | tor-d5d29cd5a2a0e09afb199f180619cf7a5172f7f9.tar.gz tor-d5d29cd5a2a0e09afb199f180619cf7a5172f7f9.zip |
Whoops. Cant call sockaddr_in a "sin", since sin() is a thing.
-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); |