From 70746cb8991640227491a0e7e63942747ab77c4c Mon Sep 17 00:00:00 2001 From: sthen Date: Sat, 26 Apr 2014 11:27:23 +0000 Subject: [PATCH] Only remove queues from the TAILQ when the ticket changes; fixes PPS/BPS displays for queues in "systat q". From Arto Jonsson. --- usr.bin/systat/pftop.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/usr.bin/systat/pftop.c b/usr.bin/systat/pftop.c index c57882d5b94..fc4a6569d58 100644 --- a/usr.bin/systat/pftop.c +++ b/usr.bin/systat/pftop.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pftop.c,v 1.24 2014/04/18 11:36:06 henning Exp $ */ +/* $OpenBSD: pftop.c,v 1.25 2014/04/26 11:27:23 sthen Exp $ */ /* * Copyright (c) 2001, 2007 Can Erkin Acar * Copyright (c) 2001 Daniel Hartmeier @@ -1588,14 +1588,10 @@ read_queues(void) int inserts; num_disp = num_queues = 0; - while ((node = TAILQ_FIRST(&qnodes)) != NULL) { - TAILQ_REMOVE(&qnodes, node, entries); - free(node); - } if (pfctl_update_qstats() < 0) return (-1); num_disp = num_queues; - + return(0); } -- 2.20.1