From f6dffe4da57d99683599a059e686cd3287d9dd24 Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Fri, 24 Jan 2003 11:37:25 +0000 Subject: 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. --- sbin/pfctl/pfctl_altq.c | 4 ++-- 1 file 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)); -- cgit v1.2.3