summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/unix.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2013-11-09 20:04:13 +0000
committerguenther <guenther@openbsd.org>2013-11-09 20:04:13 +0000
commit207bd326dd6c7c023666385d1b9ce20e08043c65 (patch)
tree0cdf5faa47b6f498e625d4ad9321d1d9b4a6c7ae /usr.bin/netstat/unix.c
parentAbort automatic installation if no sets are found in install_files(). (diff)
downloadwireguard-openbsd-207bd326dd6c7c023666385d1b9ce20e08043c65.tar.xz
wireguard-openbsd-207bd326dd6c7c023666385d1b9ce20e08043c65.zip
kinfo_file returns the socket buffer counts in uint64_ts, so we need to
update the printf format for them. While here, delete a now unused variable. problem pointed out by Scott McEachern (scott (at) blackstaff.ca)
Diffstat (limited to 'usr.bin/netstat/unix.c')
-rw-r--r--usr.bin/netstat/unix.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/netstat/unix.c b/usr.bin/netstat/unix.c
index 01454785a60..145d77b0693 100644
--- a/usr.bin/netstat/unix.c
+++ b/usr.bin/netstat/unix.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: unix.c,v 1.21 2013/10/22 16:40:28 guenther Exp $ */
+/* $OpenBSD: unix.c,v 1.22 2013/11/09 20:04:13 guenther Exp $ */
/* $NetBSD: unix.c,v 1.13 1995/10/03 21:42:48 thorpej Exp $ */
/*-
@@ -59,7 +59,6 @@ void
unixpr(kvm_t *kvmd, u_long pcbaddr)
{
struct kinfo_file *kf;
- struct socket sock, *so = &sock;
int i, fcnt;
kf = kvm_getfiles(kvmd, KERN_FILE_BYFILE, 0, sizeof(*kf), &fcnt);
@@ -99,7 +98,7 @@ unixdomainpr(const struct kinfo_file *kf, u_long pcbaddr)
}
#define FAKE_PTR(p) (PLEN - ((p) ? 0 : 2)), p, ((p) ? "" : "x0")
- printf("%#*llx%s %-6.6s %6ld %6ld %#*llx%s %#*llx%s %#*llx%s %#*llx%s",
+ printf("%#*llx%s %-6.6s %6llu %6llu %#*llx%s %#*llx%s %#*llx%s %#*llx%s",
FAKE_PTR(kf->f_data), socktype[kf->so_type],
kf->so_rcv_cc, kf->so_snd_cc,
FAKE_PTR(kf->v_un),