summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/unix.c
diff options
context:
space:
mode:
authoritojun <itojun@openbsd.org>1999-12-08 12:30:17 +0000
committeritojun <itojun@openbsd.org>1999-12-08 12:30:17 +0000
commit1b19b969a3cfa6bae48eebd3a17f1cd68700e1e7 (patch)
tree84cc957c4f8f2cc49a1eaa677186031758344b77 /usr.bin/netstat/unix.c
parentundo even more damage (diff)
downloadwireguard-openbsd-1b19b969a3cfa6bae48eebd3a17f1cd68700e1e7.tar.xz
wireguard-openbsd-1b19b969a3cfa6bae48eebd3a17f1cd68700e1e7.zip
add IPv6 support from KAME. cleanup type matches with printf() format.
KAME_SCOPEID should be enabled after KAME get{addr,name}info(3) merge.
Diffstat (limited to 'usr.bin/netstat/unix.c')
-rw-r--r--usr.bin/netstat/unix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c
index 0f8846c4d22..2547eb0ba11 100644
--- a/usr.bin/netstat/unix.c
+++ b/usr.bin/netstat/unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unix.c,v 1.5 1997/06/29 21:46:06 millert Exp $ */
+/* $OpenBSD: unix.c,v 1.6 1999/12/08 12:30:17 itojun Exp $ */
/* $NetBSD: unix.c,v 1.13 1995/10/03 21:42:48 thorpej Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "from: @(#)unix.c 8.1 (Berkeley) 6/6/93";
#else
-static char *rcsid = "$OpenBSD: unix.c,v 1.5 1997/06/29 21:46:06 millert Exp $";
+static char *rcsid = "$OpenBSD: unix.c,v 1.6 1999/12/08 12:30:17 itojun Exp $";
#endif
#endif /* not lint */
@@ -110,7 +110,7 @@ unixdomainpr(so, soaddr)
{
struct unpcb unpcb, *unp = &unpcb;
struct mbuf mbuf, *m;
- struct sockaddr_un *sa;
+ struct sockaddr_un *sa = NULL;
static int first = 1;
if (kread((u_long)so->so_pcb, (char *)unp, sizeof (*unp)))
@@ -137,7 +137,7 @@ unixdomainpr(so, soaddr)
PLEN, unp->unp_refs, PLEN, unp->unp_nextref);
if (m)
printf(" %.*s",
- m->m_len - (int)(sizeof(*sa) - sizeof(sa->sun_path)),
+ (int)(m->m_len - (int)(sizeof(*sa) - sizeof(sa->sun_path))),
sa->sun_path);
putchar('\n');
}