summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Hartmeier <dhartmei@cvs.openbsd.org>2005-03-02 16:47:57 +0000
committerDaniel Hartmeier <dhartmei@cvs.openbsd.org>2005-03-02 16:47:57 +0000
commitf0bbc244eec8227cf23e2a0b5062ebb6f902a917 (patch)
treedabc3c76656351c7c0fecefa9117dfb6c303fc96
parentdae7e8974e3a4f2f4cb9382e5c27b4eb24d19ff1 (diff)
make counters in struct iftot u_long instead of int, as they overflow
on amd64. from Peter Philipp. closes PR 4107.
-rw-r--r--usr.bin/netstat/if.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/netstat/if.c b/usr.bin/netstat/if.c
index 7c74e047c97..7b9ebd037a0 100644
--- a/usr.bin/netstat/if.c
+++ b/usr.bin/netstat/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.39 2004/06/25 20:05:40 henning Exp $ */
+/* $OpenBSD: if.c,v 1.40 2005/03/02 16:47:56 dhartmei Exp $ */
/* $NetBSD: if.c,v 1.16.4.2 1996/06/07 21:46:46 thorpej Exp $ */
/*
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
#else
-static char *rcsid = "$OpenBSD: if.c,v 1.39 2004/06/25 20:05:40 henning Exp $";
+static char *rcsid = "$OpenBSD: if.c,v 1.40 2005/03/02 16:47:56 dhartmei Exp $";
#endif
#endif /* not lint */
@@ -366,14 +366,14 @@ intpr(int interval, u_long ifnetaddr)
#define MAXIF 100
struct iftot {
char ift_name[IFNAMSIZ]; /* interface name */
- int ift_ip; /* input packets */
- int ift_ib; /* input bytes */
- int ift_ie; /* input errors */
- int ift_op; /* output packets */
- int ift_ob; /* output bytes */
- int ift_oe; /* output errors */
- int ift_co; /* collisions */
- int ift_dr; /* drops */
+ u_long ift_ip; /* input packets */
+ u_long ift_ib; /* input bytes */
+ u_long ift_ie; /* input errors */
+ u_long ift_op; /* output packets */
+ u_long ift_ob; /* output bytes */
+ u_long ift_oe; /* output errors */
+ u_long ift_co; /* collisions */
+ u_long ift_dr; /* drops */
} iftot[MAXIF];
volatile sig_atomic_t signalled; /* set if alarm goes off "early" */