summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2001-07-31 19:50:16 +0000
committerderaadt <deraadt@openbsd.org>2001-07-31 19:50:16 +0000
commitd506adee88cddd5fd170d94969a4192affa52fd6 (patch)
tree4fa21edbf6c969527f2c487ab4c59c9b05935804
parentsync (diff)
downloadwireguard-openbsd-d506adee88cddd5fd170d94969a4192affa52fd6.tar.xz
wireguard-openbsd-d506adee88cddd5fd170d94969a4192affa52fd6.zip
shrink even more
-rw-r--r--usr.sbin/slstats/slstats.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/usr.sbin/slstats/slstats.c b/usr.sbin/slstats/slstats.c
index 11092c422d8..ff61ed01615 100644
--- a/usr.sbin/slstats/slstats.c
+++ b/usr.sbin/slstats/slstats.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slstats.c,v 1.10 2001/06/12 21:41:32 deraadt Exp $ */
+/* $OpenBSD: slstats.c,v 1.11 2001/07/31 19:50:16 deraadt Exp $ */
/* $NetBSD: slstats.c,v 1.6.6.1 1996/06/07 01:42:30 thorpej Exp $ */
/*
@@ -25,7 +25,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: slstats.c,v 1.10 2001/06/12 21:41:32 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: slstats.c,v 1.11 2001/07/31 19:50:16 deraadt Exp $";
#endif
#define INET
@@ -62,16 +62,15 @@ static char rcsid[] = "$OpenBSD: slstats.c,v 1.10 2001/06/12 21:41:32 deraadt Ex
extern char *__progname; /* from crt0.o */
int vflag;
-unsigned interval = 5;
+u_int interval = 5;
int unit;
+int s;
+char interface[IFNAMSIZ];
void catchalarm __P((void));
void intpr __P((void));
void usage __P((void));
-int s;
-char interface[IFNAMSIZ];
-
int
main(argc, argv)
int argc;
@@ -163,23 +162,13 @@ get_sl_stats(curp)
void
intpr()
{
- register int line = 0;
+ int line = 0;
int oldmask;
struct sl_stats cur, old;
-#if 0
- struct sl_comp_stats ccs, ocs;
-#endif
bzero(&old, sizeof(old));
-#if 0
- bzero(&ocs, sizeof(ocs));
-#endif
while (1) {
get_sl_stats(&cur);
-#if 0
- if (zflag || rflag)
- get_sl_cstats(&ccs);
-#endif
(void)signal(SIGALRM, (void (*)())catchalarm);
signalled = 0;
@@ -218,9 +207,8 @@ intpr()
fflush(stdout);
line++;
oldmask = sigblock(sigmask(SIGALRM));
- if (!signalled) {
+ if (!signalled)
sigpause(0);
- }
sigsetmask(oldmask);
signalled = 0;
(void)alarm(interval);