diff options
author | otto <> | 2005-02-08 15:26:23 +0000 |
---|---|---|
committer | otto <> | 2005-02-08 15:26:23 +0000 |
commit | 3273bfcfafdb256c9dbd7cbc504d9e52378982fd (patch) | |
tree | c3bbce5715367eb04077966f7668348a73f422cd /src/usr.bin/nc/socks.c | |
parent | a7f629555d85050aa100f0d3319053e6f8f21bdb (diff) | |
download | openbsd-3273bfcfafdb256c9dbd7cbc504d9e52378982fd.tar.gz openbsd-3273bfcfafdb256c9dbd7cbc504d9e52378982fd.tar.bz2 openbsd-3273bfcfafdb256c9dbd7cbc504d9e52378982fd.zip |
Some extra strict warning cleanup. From Xin Li <delphij at FreeBSD
dot ORG> with a twist from myself. No binary change. ok djm@
Diffstat (limited to 'src/usr.bin/nc/socks.c')
-rw-r--r-- | src/usr.bin/nc/socks.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/usr.bin/nc/socks.c b/src/usr.bin/nc/socks.c index e7d35b601a..035898e7e6 100644 --- a/src/usr.bin/nc/socks.c +++ b/src/usr.bin/nc/socks.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: socks.c,v 1.9 2004/10/17 03:13:55 djm Exp $ */ | 1 | /* $OpenBSD: socks.c,v 1.10 2005/02/08 15:26:23 otto Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. | 4 | * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. |
@@ -48,9 +48,9 @@ | |||
48 | #define SOCKS_IPV4 1 | 48 | #define SOCKS_IPV4 1 |
49 | 49 | ||
50 | 50 | ||
51 | int remote_connect(char *, char *, struct addrinfo); | 51 | int remote_connect(const char *, const char *, struct addrinfo); |
52 | int socks_connect(char *host, char *port, struct addrinfo hints, | 52 | int socks_connect(const char *host, const char *port, struct addrinfo hints, |
53 | char *proxyhost, char *proxyport, struct addrinfo proxyhints, | 53 | const char *proxyhost, const char *proxyport, struct addrinfo proxyhints, |
54 | int socksv); | 54 | int socksv); |
55 | 55 | ||
56 | static in_addr_t | 56 | static in_addr_t |
@@ -110,8 +110,9 @@ proxy_read_line(int fd, char *buf, int bufsz) | |||
110 | } | 110 | } |
111 | 111 | ||
112 | int | 112 | int |
113 | socks_connect(char *host, char *port, struct addrinfo hints, | 113 | socks_connect(const char *host, const char *port, |
114 | char *proxyhost, char *proxyport, struct addrinfo proxyhints, | 114 | struct addrinfo hints __attribute__ ((__unused__)), |
115 | const char *proxyhost, const char *proxyport, struct addrinfo proxyhints, | ||
115 | int socksv) | 116 | int socksv) |
116 | { | 117 | { |
117 | int proxyfd, r; | 118 | int proxyfd, r; |
@@ -208,7 +209,7 @@ socks_connect(char *host, char *port, struct addrinfo hints, | |||
208 | "CONNECT %s:%d HTTP/1.0\r\n\r\n", | 209 | "CONNECT %s:%d HTTP/1.0\r\n\r\n", |
209 | host, ntohs(serverport)); | 210 | host, ntohs(serverport)); |
210 | } | 211 | } |
211 | if (r == -1 || r >= sizeof(buf)) | 212 | if (r == -1 || (size_t)r >= sizeof(buf)) |
212 | errx (1, "hostname too long"); | 213 | errx (1, "hostname too long"); |
213 | r = strlen(buf); | 214 | r = strlen(buf); |
214 | 215 | ||