aboutsummaryrefslogtreecommitdiff
path: root/src/tools/tor-resolve.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-02 03:02:17 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-02 03:02:17 +0000
commitad4dc7448257c229860206b078e02778bcb1b408 (patch)
tree823243e7bc13876a466176db862028402dd4526b /src/tools/tor-resolve.c
parent85c79ffbc7b965355c3b51cc81000d517089e74e (diff)
downloadtor-ad4dc7448257c229860206b078e02778bcb1b408.tar.gz
tor-ad4dc7448257c229860206b078e02778bcb1b408.zip
Use a stricter set of warnings; make them all pass.
svn:r2645
Diffstat (limited to 'src/tools/tor-resolve.c')
-rw-r--r--src/tools/tor-resolve.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c
index 7249738743..691be8257a 100644
--- a/src/tools/tor-resolve.c
+++ b/src/tools/tor-resolve.c
@@ -44,9 +44,10 @@
do { log_fn(LOG_ERR, "Error while %s: %s", act, \
tor_socket_strerror(tor_socket_errno(_s))); } while(0)
-int build_socks4a_resolve_request(char **out,
- const char *username,
- const char *hostname)
+static int
+build_socks4a_resolve_request(char **out,
+ const char *username,
+ const char *hostname)
{
size_t len;
tor_assert(out);
@@ -65,8 +66,9 @@ int build_socks4a_resolve_request(char **out,
return len;
}
-int parse_socks4a_resolve_response(const char *response, size_t len,
- uint32_t *addr_out)
+static int
+parse_socks4a_resolve_response(const char *response, size_t len,
+ uint32_t *addr_out)
{
uint8_t status;
tor_assert(response);
@@ -86,8 +88,9 @@ int parse_socks4a_resolve_response(const char *response, size_t len,
return 0;
}
-int do_resolve(const char *hostname, uint32_t sockshost, uint16_t socksport,
- uint32_t *result_addr)
+static int
+do_resolve(const char *hostname, uint32_t sockshost, uint16_t socksport,
+ uint32_t *result_addr)
{
int s;
struct sockaddr_in socksaddr;
@@ -149,7 +152,8 @@ int do_resolve(const char *hostname, uint32_t sockshost, uint16_t socksport,
return 0;
}
-void usage(void)
+static void
+usage(void)
{
puts("Syntax: tor-resolve [-v] hostname [sockshost:socksport]");
exit(1);