From 12f6c8080f5dadc2d7c9657eb816cb7bf2e8713c Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Wed, 15 Dec 2010 13:54:51 +0000 Subject: make the "invalid probability:" yyerror suck less From: Thomas Pfaff --- sbin/pfctl/parse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sbin') 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; -- cgit v1.2.3