summaryrefslogtreecommitdiff
path: root/usr.bin/systat/mbufs.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-23 22:20:07 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-11-23 22:20:07 +0000
commit2b5bf0455cfdd3b06f52578c304a38c1bf3a7b71 (patch)
tree37ef459856cfa832a96015c1198685a1d081c657 /usr.bin/systat/mbufs.c
parent6df9f030ceddc8afca7343c0bfe949a027e08212 (diff)
fix signal races. use sysctl() instead of kvm where possible, and then KNF
the hell out of it; checked by miod
Diffstat (limited to 'usr.bin/systat/mbufs.c')
-rw-r--r--usr.bin/systat/mbufs.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.bin/systat/mbufs.c b/usr.bin/systat/mbufs.c
index 60616a682e3..ec3521e5b7e 100644
--- a/usr.bin/systat/mbufs.c
+++ b/usr.bin/systat/mbufs.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mbufs.c,v 1.6 2001/11/19 19:02:16 mpech Exp $ */
+/* $OpenBSD: mbufs.c,v 1.7 2001/11/23 22:20:06 deraadt Exp $ */
/* $NetBSD: mbufs.c,v 1.2 1995/01/20 08:52:02 jtc Exp $ */
/*-
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)mbufs.c 8.1 (Berkeley) 6/6/93";
#endif
-static char rcsid[] = "$OpenBSD: mbufs.c,v 1.6 2001/11/19 19:02:16 mpech Exp $";
+static char rcsid[] = "$OpenBSD: mbufs.c,v 1.7 2001/11/23 22:20:06 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -48,6 +48,7 @@ static char rcsid[] = "$OpenBSD: mbufs.c,v 1.6 2001/11/19 19:02:16 mpech Exp $";
#include <stdlib.h>
#include <string.h>
#include <nlist.h>
+#include <err.h>
#include <paths.h>
#include "systat.h"
#include "extern.h"
@@ -107,7 +108,7 @@ showmbufs()
if (mb == 0)
return;
for (j = 0; j < wnd->_maxy; j++) {
- max = 0, index = -1;
+ max = 0, index = -1;
for (i = 0; i < wnd->_maxy; i++)
if (mb->m_mtypes[i] > max) {
max = mb->m_mtypes[i];