summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorEric Jackson <ericj@cvs.openbsd.org>2002-02-19 22:42:05 +0000
committerEric Jackson <ericj@cvs.openbsd.org>2002-02-19 22:42:05 +0000
commit598ba4f11965b32247fa0028d027012079a2abab (patch)
tree7e8909b3cdb2cf0bd61b56b5db23c2003076003c /usr.bin
parent52cf798b76fb5449aa9fe7efaa46107daec5a0d2 (diff)
-Wall cleanup.
from Kevin Steves <stevesk@pobox.com>
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/nc/netcat.c8
-rw-r--r--usr.bin/nc/socks.c4
2 files changed, 8 insertions, 4 deletions
diff --git a/usr.bin/nc/netcat.c b/usr.bin/nc/netcat.c
index 8d5603c999c..e3c0befef97 100644
--- a/usr.bin/nc/netcat.c
+++ b/usr.bin/nc/netcat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: netcat.c,v 1.44 2002/02/17 19:42:31 millert Exp $ */
+/* $OpenBSD: netcat.c,v 1.45 2002/02/19 22:42:04 ericj Exp $ */
/*
* Copyright (c) 2001 Eric Jackson <ericj@monkey.org>
*
@@ -77,6 +77,8 @@ void help(void);
int local_listen(char *, char *, struct addrinfo);
void readwrite(int);
int remote_connect(char *, char *, struct addrinfo);
+int socks_connect(char *, char *, struct addrinfo, char *, char *,
+ struct addrinfo);
int udptest(int);
int unix_connect(char *);
int unix_listen(char *);
@@ -92,7 +94,7 @@ main(int argc, char *argv[])
socklen_t len;
struct sockaddr *cliaddr;
char *proxy;
- char *proxyhost, *proxyport;
+ char *proxyhost = "", *proxyport = NULL;
struct addrinfo proxyhints;
ret = 1;
@@ -389,7 +391,7 @@ unix_listen(char *path)
sun.sun_family = AF_UNIX;
strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
- if (bind(s, (struct sockaddr *)&sun, SUN_LEN(&sun)) < 0) {
+ if (bind(s, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
close(s);
return (-1);
}
diff --git a/usr.bin/nc/socks.c b/usr.bin/nc/socks.c
index 826a316e555..a68e36af067 100644
--- a/usr.bin/nc/socks.c
+++ b/usr.bin/nc/socks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: socks.c,v 1.3 2001/10/28 19:46:12 jakob Exp $ */
+/* $OpenBSD: socks.c,v 1.4 2002/02/19 22:42:04 ericj Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist. All rights reserved.
@@ -49,6 +49,8 @@
#define SOCKS_IPV4 1
#define SOCKS_MAXCMDSZ 10
+int remote_connect(char *, char *, struct addrinfo);
+
static in_addr_t
decode_addr (const char *s)
{