summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpelikan <pelikan@openbsd.org>2014-01-03 19:58:54 +0000
committerpelikan <pelikan@openbsd.org>2014-01-03 19:58:54 +0000
commit686ff949ad4b9f966c78f8c9dfe5e96f18a6cb13 (patch)
tree77ac6e67c3cd07365e03bab8b842cfe7dbd97697
parentdon't initialize declared variable with a function call (diff)
downloadwireguard-openbsd-686ff949ad4b9f966c78f8c9dfe5e96f18a6cb13.tar.xz
wireguard-openbsd-686ff949ad4b9f966c78f8c9dfe5e96f18a6cb13.zip
Purging a queue requires it to be non-empty, not empty.
ok millert
-rw-r--r--sys/net/hfsc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/hfsc.c b/sys/net/hfsc.c
index 7709310da35..dcb0a097782 100644
--- a/sys/net/hfsc.c
+++ b/sys/net/hfsc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hfsc.c,v 1.6 2014/01/03 12:48:58 pelikan Exp $ */
+/* $OpenBSD: hfsc.c,v 1.7 2014/01/03 19:58:54 pelikan Exp $ */
/*
* Copyright (c) 2012-2013 Henning Brauer <henning@openbsd.org>
@@ -677,7 +677,7 @@ hfsc_purgeq(struct hfsc_class *cl)
{
struct mbuf *m;
- if (cl->cl_q->qlen > 0)
+ if (cl->cl_q->qlen == 0)
return;
while ((m = hfsc_getq(cl)) != NULL) {