aboutsummaryrefslogtreecommitdiff
path: root/src/tools/tor-resolve.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-05-16 22:15:14 +0000
committerNick Mathewson <nickm@torproject.org>2007-05-16 22:15:14 +0000
commitb837191fd0e897cbc5fc33874190bab8bbb83268 (patch)
tree96b7bf77047a1873c56931c4f1387cd3c36f79c8 /src/tools/tor-resolve.c
parente043b86f47185e0d9df53dab12d42e46c8c35b83 (diff)
downloadtor-b837191fd0e897cbc5fc33874190bab8bbb83268.tar.gz
tor-b837191fd0e897cbc5fc33874190bab8bbb83268.zip
r12768@catbus: nickm | 2007-05-16 17:25:33 -0400
Fix GCC warnings related to local parameters/variables getting shadowed. svn:r10198
Diffstat (limited to 'src/tools/tor-resolve.c')
-rw-r--r--src/tools/tor-resolve.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c
index 328c74e4c9..3eebb57a6e 100644
--- a/src/tools/tor-resolve.c
+++ b/src/tools/tor-resolve.c
@@ -237,18 +237,18 @@ do_resolve(const char *hostname, uint32_t sockshost, uint16_t socksport,
}
*result_addr = ntohl(get_uint32(reply_buf));
} else if (reply_buf[3] == 3) {
- size_t len;
+ size_t result_len;
if (read_all(s, reply_buf, 1, 1) != 1) {
log_err(LD_NET, "Error reading address_length in socks5 response.");
return -1;
}
- len = *(uint8_t*)(reply_buf);
- *result_hostname = tor_malloc(len+1);
- if (read_all(s, *result_hostname, len, 1) != (int) len) {
+ result_len = *(uint8_t*)(reply_buf);
+ *result_hostname = tor_malloc(result_len+1);
+ if (read_all(s, *result_hostname, result_len, 1) != (int) result_len) {
log_err(LD_NET, "Error reading hostname in socks5 response.");
return -1;
}
- (*result_hostname)[len] = '\0';
+ (*result_hostname)[result_len] = '\0';
}
}