diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-01-26 11:59:01 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-01-26 12:08:15 -0500 |
commit | 6ed384b827dce21ea3a44b58792cc28b2ed48056 (patch) | |
tree | 7f4e7f5af7ef3cb21dae370cb0f0e0f2acc16b7d /src/common/compat.c | |
parent | 2a7bfec364a30a92c3babe658ece2db1a8a40d03 (diff) | |
download | tor-6ed384b827dce21ea3a44b58792cc28b2ed48056.tar.gz tor-6ed384b827dce21ea3a44b58792cc28b2ed48056.zip |
Use tor_addr_from_getsockname() in several places
I'm leaving the getsockname code in transproxy alone, since it is
comparatively isolated, rather platform-specific, and hard to test.
Implements 18105.
Diffstat (limited to 'src/common/compat.c')
-rw-r--r-- | src/common/compat.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c index c457e6383f..204fbd62e6 100644 --- a/src/common/compat.c +++ b/src/common/compat.c @@ -1402,7 +1402,7 @@ tor_addr_from_getsockname(tor_addr_t *addr_out, tor_socket_t sock) { struct sockaddr_storage ss; socklen_t ss_len = sizeof(ss); - memset(ss, 0, sizeof(ss)); + memset(&ss, 0, sizeof(ss)); if (tor_getsockname(sock, (struct sockaddr *) &ss, &ss_len) < 0) return -1; |