summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-01-24 11:37:25 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-01-24 11:37:25 +0000
commitf6dffe4da57d99683599a059e686cd3287d9dd24 (patch)
tree7c16cadacc5977c91c796d4a1e3f728636671ae1
parent256367812d0f1e51f5c49db403ab280a663dcdab (diff)
make rate2str include the unit in the ouput even if it is 0b. was irrelevant
before as you cannot specify "bandwidth 0b" on a rule; now that rate2str is used for the stats output it does matter.
-rw-r--r--sbin/pfctl/pfctl_altq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/pfctl_altq.c b/sbin/pfctl/pfctl_altq.c
index 0bc05f461c8..1a52a9d6c53 100644
--- a/sbin/pfctl/pfctl_altq.c
+++ b/sbin/pfctl/pfctl_altq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfctl_altq.c,v 1.35 2003/01/24 10:53:32 henning Exp $ */
+/* $OpenBSD: pfctl_altq.c,v 1.36 2003/01/24 11:37:24 henning Exp $ */
/*
* Copyright (C) 2002
@@ -1019,7 +1019,7 @@ rate2str(double rate)
idx = 0;
if (rate == 0.0)
- snprintf(buf, RATESTR_MAX, "0");
+ snprintf(buf, RATESTR_MAX, "0b");
else if (rate >= 1000 * 1000 * 1000)
snprintf(buf, RATESTR_MAX, "%.2fGb",
rate / (1000.0 * 1000.0 * 1000.0));