summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/systat/cache.c4
-rw-r--r--usr.bin/systat/cache.h4
-rw-r--r--usr.bin/systat/pftop.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/systat/cache.c b/usr.bin/systat/cache.c
index 7f55e645a79..e20c802bbd2 100644
--- a/usr.bin/systat/cache.c
+++ b/usr.bin/systat/cache.c
@@ -1,4 +1,4 @@
-/* $Id: cache.c,v 1.5 2014/10/08 04:10:04 doug Exp $ */
+/* $Id: cache.c,v 1.6 2016/01/16 03:30:26 canacar Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar <canacar@openbsd.org>
*
@@ -123,7 +123,7 @@ add_state(struct pfsync_state *st)
ent->bytes = COUNTER(st->bytes[0]) + COUNTER(st->bytes[1]);
ent->peak = 0;
ent->rate = 0;
- ent->t = time(NULL);
+ ent->t = 0;
RB_INSERT(sc_tree, &sctree, ent);
TAILQ_INSERT_HEAD(scq_act, ent, qlink);
diff --git a/usr.bin/systat/cache.h b/usr.bin/systat/cache.h
index 5bff5c1ce88..ba875047205 100644
--- a/usr.bin/systat/cache.h
+++ b/usr.bin/systat/cache.h
@@ -1,4 +1,4 @@
-/* $Id: cache.h,v 1.4 2011/11/29 10:19:15 dlg Exp $ */
+/* $Id: cache.h,v 1.5 2016/01/16 03:30:26 canacar Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar <canacar@openbsd.org>
*
@@ -30,7 +30,7 @@ struct sc_ent {
double peak;
double rate;
time_t t;
- u_int32_t bytes;
+ u_int64_t bytes;
};
int cache_init(int);
diff --git a/usr.bin/systat/pftop.c b/usr.bin/systat/pftop.c
index 33479c5e7b1..cde86867503 100644
--- a/usr.bin/systat/pftop.c
+++ b/usr.bin/systat/pftop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pftop.c,v 1.32 2015/08/20 22:32:42 deraadt Exp $ */
+/* $OpenBSD: pftop.c,v 1.33 2016/01/16 03:30:26 canacar Exp $ */
/*
* Copyright (c) 2001, 2007 Can Erkin Acar
* Copyright (c) 2001 Daniel Hartmeier
@@ -896,7 +896,7 @@ print_state(struct pfsync_state * s, struct sc_ent * ent)
COUNTER(s->packets[1]));
print_fld_size(FLD_BYTES, sz);
print_fld_rate(FLD_SA, (s->creation) ?
- ((double)sz/ntohl((double)s->creation)) : -1);
+ ((double)sz/(double)ntohl(s->creation)) : -1);
print_fld_uint(FLD_RULE, ntohl(s->rule));
if (cachestates && ent != NULL) {