summaryrefslogtreecommitdiffstats
path: root/usr.bin/netstat/main.c
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-01-27 13:49:21 +0000
committerclaudio <claudio@openbsd.org>2009-01-27 13:49:21 +0000
commitc0f2ea6adc36745a0f119ff124cfa4ae6a11c01b (patch)
treef2db663ef691f9101ad7f68a9c16f5ab99fc4b09 /usr.bin/netstat/main.c
parentFix another double free in the filter parser. (diff)
downloadwireguard-openbsd-c0f2ea6adc36745a0f119ff124cfa4ae6a11c01b.tar.xz
wireguard-openbsd-c0f2ea6adc36745a0f119ff124cfa4ae6a11c01b.zip
Fix some interger overflows when accounting the used mbuf memory percentage
and while there use a better type for the plural{,es}() functions. OK henning@
Diffstat (limited to 'usr.bin/netstat/main.c')
-rw-r--r--usr.bin/netstat/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/netstat/main.c b/usr.bin/netstat/main.c
index 0d960476fd7..434088a7aa0 100644
--- a/usr.bin/netstat/main.c
+++ b/usr.bin/netstat/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.76 2008/09/16 15:48:13 gollo Exp $ */
+/* $OpenBSD: main.c,v 1.77 2009/01/27 13:49:21 claudio Exp $ */
/* $NetBSD: main.c,v 1.9 1996/05/07 02:55:02 thorpej Exp $ */
/*
@@ -464,13 +464,13 @@ kread(u_long addr, void *buf, int size)
}
char *
-plural(int n)
+plural(u_int64_t n)
{
return (n != 1 ? "s" : "");
}
char *
-plurales(int n)
+plurales(u_int64_t n)
{
return (n != 1 ? "es" : "");
}