summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2010-12-15 13:54:51 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2010-12-15 13:54:51 +0000
commit12f6c8080f5dadc2d7c9657eb816cb7bf2e8713c (patch)
treee461d9f7408cb03a1844cc50cf51fd79023f70fb /sbin
parent11d6e962f41eac58eafcdeae154ce120ec5437c5 (diff)
make the "invalid probability:" yyerror suck less
From: Thomas Pfaff <tpfaff@tp76.info>
Diffstat (limited to 'sbin')
-rw-r--r--sbin/pfctl/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y
index dca3aeb1712..519085a7028 100644
--- a/sbin/pfctl/parse.y
+++ b/sbin/pfctl/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.595 2010/12/01 10:35:18 jsg Exp $ */
+/* $OpenBSD: parse.y,v 1.596 2010/12/15 13:54:50 henning Exp $ */
/*
* Copyright (c) 2001 Markus Friedl. All rights reserved.
@@ -2208,7 +2208,7 @@ filter_opt : USER uids {
p = floor($2 * UINT_MAX + 0.5);
if (p < 0.0 || p > UINT_MAX) {
- yyerror("invalid probability: %lf", p);
+ yyerror("invalid probability: %g%%", $2 * 100);
YYERROR;
}
filter_opts.prob = (u_int32_t)p;