summaryrefslogtreecommitdiff
path: root/usr.bin/netstat
diff options
context:
space:
mode:
authorYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2023-07-07 14:17:36 +0000
committerYASUOKA Masahiko <yasuoka@cvs.openbsd.org>2023-07-07 14:17:36 +0000
commite4563a3a3b05fb5dff06a86e814b8f663a36a373 (patch)
treee27855b72ecf7cf530aaabe3eb1dcf33305b04ac /usr.bin/netstat
parent2b9db4ff5cc9f7345ce32bd33a840f1d2662fc99 (diff)
Expand the counters in struct mbstat from u_short to u_long.
ok blumn mvs
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r--usr.bin/netstat/mbuf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/netstat/mbuf.c b/usr.bin/netstat/mbuf.c
index b52a76f596c..dfb7695b737 100644
--- a/usr.bin/netstat/mbuf.c
+++ b/usr.bin/netstat/mbuf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbuf.c,v 1.43 2019/07/16 17:39:02 bluhm Exp $ */
+/* $OpenBSD: mbuf.c,v 1.44 2023/07/07 14:17:35 yasuoka Exp $ */
/* $NetBSD: mbuf.c,v 1.9 1996/05/07 02:55:03 thorpej Exp $ */
/*
@@ -78,7 +78,7 @@ static struct mbtypes {
{ 0, 0 }
};
-int nmbtypes = sizeof(mbstat.m_mtypes) / sizeof(short);
+int nmbtypes = sizeof(mbstat.m_mtypes) / sizeof(u_long);
bool seen[256]; /* "have we seen this type yet?" */
/*
@@ -172,7 +172,7 @@ mbpr(void)
for (mp = mbtypes; mp->mt_name; mp++)
if (mbstat.m_mtypes[mp->mt_type]) {
seen[mp->mt_type] = YES;
- printf("\t%u mbuf%s allocated to %s\n",
+ printf("\t%lu mbuf%s allocated to %s\n",
mbstat.m_mtypes[mp->mt_type],
plural(mbstat.m_mtypes[mp->mt_type]),
mp->mt_name);
@@ -180,7 +180,7 @@ mbpr(void)
seen[MT_FREE] = YES;
for (i = 0; i < nmbtypes; i++)
if (!seen[i] && mbstat.m_mtypes[i]) {
- printf("\t%u mbuf%s allocated to <mbuf type %d>\n",
+ printf("\t%lu mbuf%s allocated to <mbuf type %d>\n",
mbstat.m_mtypes[i],
plural(mbstat.m_mtypes[i]), i);
}