diff options
author | 2004-02-05 18:06:12 +0000 | |
---|---|---|
committer | 2004-02-05 18:06:12 +0000 | |
commit | 4483ea6be12210604fd34f400f70b48c826216ec (patch) | |
tree | ecd772e535c5017313fd4d8361e9a08e8e7bb0b2 | |
parent | fix ETA for > 4GB; bugzilla #791; ok henning@ deraadt@ (diff) | |
download | wireguard-openbsd-4483ea6be12210604fd34f400f70b48c826216ec.tar.xz wireguard-openbsd-4483ea6be12210604fd34f400f70b48c826216ec.zip |
pfctl_update_qstats() returns -1 on error and the # of queues otehrwise
fix a check of the return value to cope woth that
inspired by PR3675 from Marc Huber <Marc.Huber@web.de>, fixed slightly
different.
-rw-r--r-- | sbin/pfctl/pfctl_qstats.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_qstats.c b/sbin/pfctl/pfctl_qstats.c index 0517fcdd248..026baca276b 100644 --- a/sbin/pfctl/pfctl_qstats.c +++ b/sbin/pfctl/pfctl_qstats.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pfctl_qstats.c,v 1.25 2004/01/29 01:25:13 mcbride Exp $ */ +/* $OpenBSD: pfctl_qstats.c,v 1.26 2004/02/05 18:06:12 henning Exp $ */ /* * Copyright (c) Henning Brauer <henning@openbsd.org> @@ -99,7 +99,7 @@ pfctl_show_altq(int dev, int opts, int verbose2) printf("\n"); fflush(stdout); sleep(STAT_INTERVAL); - if (pfctl_update_qstats(dev, &root)) + if (pfctl_update_qstats(dev, &root) == -1) return (-1); for (node = root; node != NULL; node = node->next) pfctl_print_altq_node(dev, node, 0, opts); |