summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/unix.c
diff options
context:
space:
mode:
authorgjb <gjb@FreeBSD.org>2016-02-02 22:27:48 +0000
committergjb <gjb@FreeBSD.org>2016-02-02 22:27:48 +0000
commitefd5551e55b056811a107b33e1c30676ee37d0e8 (patch)
tree5ea64f05cc16d8a5032524fdefec823e707e1ff3 /usr.bin/netstat/unix.c
parenta6998ad84f9722c560a80302a74fa495e818a153 (diff)
parent6d511d769313fd1dae574a1d395369df219e86b6 (diff)
downloadFreeBSD-src-efd5551e55b056811a107b33e1c30676ee37d0e8.zip
FreeBSD-src-efd5551e55b056811a107b33e1c30676ee37d0e8.tar.gz
MFH
Sponsored by: The FreeBSD Foundation
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 a7503f5..04e4ae5 100644
--- a/usr.bin/netstat/unix.c
+++ b/usr.bin/netstat/unix.c
@@ -271,7 +271,7 @@ unixdomainpr(struct xunpcb *xunp, struct xsocket *so)
struct unpcb *unp;
struct sockaddr_un *sa;
static int first = 1;
- char buf1[15];
+ char buf1[33];
static const char *titles[2] = {
"{T:/%-8.8s} {T:/%-6.6s} {T:/%-6.6s} {T:/%-6.6s} {T:/%8.8s} "
"{T:/%8.8s} {T:/%8.8s} {T:/%8.8s} {T:Addr}\n",
@@ -310,10 +310,10 @@ unixdomainpr(struct xunpcb *xunp, struct xsocket *so)
return;
if (Lflag) {
- snprintf(buf1, 15, "%d/%d/%d", so->so_qlen,
+ snprintf(buf1, sizeof buf1, "%u/%u/%u", so->so_qlen,
so->so_incqlen, so->so_qlimit);
- xo_emit("unix {d:socket/%-14.14s}{e:queue-length/%d}"
- "{e:incomplete-queue-length/%d}{e:queue-limit/%d}",
+ xo_emit("unix {d:socket/%-32.32s}{e:queue-length/%u}"
+ "{e:incomplete-queue-length/%u}{e:queue-limit/%u}",
buf1, so->so_qlen, so->so_incqlen, so->so_qlimit);
} else {
xo_emit(format[fmt],
OpenPOWER on IntegriCloud