summaryrefslogtreecommitdiff
path: root/ifpps.c
diff options
context:
space:
mode:
Diffstat (limited to 'ifpps.c')
-rw-r--r--ifpps.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/ifpps.c b/ifpps.c
index 9d86602..1a67551 100644
--- a/ifpps.c
+++ b/ifpps.c
@@ -528,8 +528,11 @@ static int stats_wireless(const char *ifname, struct ifstat *stats)
if (sizeof(diff->member) != sizeof(new->member) || \
sizeof(diff->member) != sizeof(old->member)) \
bug(); \
- bug_on((new->member - old->member) > (new->member)); \
- DIFF1(member); \
+ if ((new->member - old->member) > (new->member)) { \
+ diff->member = 0; \
+ } else { \
+ DIFF1(member); \
+ } \
} while (0)
static void stats_diff(struct ifstat *old, struct ifstat *new,