[PATCH] parser: compact log level grammar

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Put rule and action on a single line as for other simple mappings.

Signed-off-by: Patrick McHardy <kaber@xxxxxxxxx>
---
 src/parser.y | 40 ++++++++--------------------------------
 1 file changed, 8 insertions(+), 32 deletions(-)

diff --git a/src/parser.y b/src/parser.y
index 653c764..be3b2e9 100644
--- a/src/parser.y
+++ b/src/parser.y
@@ -1316,38 +1316,14 @@ log_arg			:	PREFIX			string
 			}
 			;
 
-level_type		:	LEVEL_EMERG
-			{
-				$$ = LOG_EMERG;
-			}
-			|	LEVEL_ALERT
-			{
-				$$ = LOG_ALERT;
-			}
-			|	LEVEL_CRIT
-			{
-				$$ = LOG_CRIT;
-			}
-			|	LEVEL_ERR
-			{
-				$$ = LOG_ERR;
-			}
-			|	LEVEL_WARN
-			{
-				$$ = LOG_WARNING;
-			}
-			|	LEVEL_NOTICE
-			{
-				$$ = LOG_NOTICE;
-			}
-			|	LEVEL_INFO
-			{
-				$$ = LOG_INFO;
-			}
-			|	LEVEL_DEBUG
-			{
-				$$ = LOG_DEBUG;
-			}
+level_type		:	LEVEL_EMERG	{ $$ = LOG_EMERG; }
+			|	LEVEL_ALERT	{ $$ = LOG_ALERT; }
+			|	LEVEL_CRIT	{ $$ = LOG_CRIT; }
+			|	LEVEL_ERR	{ $$ = LOG_ERR; }
+			|	LEVEL_WARN	{ $$ = LOG_WARNING; }
+			|	LEVEL_NOTICE	{ $$ = LOG_NOTICE; }
+			|	LEVEL_INFO	{ $$ = LOG_INFO; }
+			|	LEVEL_DEBUG	{ $$ = LOG_DEBUG; }
 			;
 
 limit_stmt		:	LIMIT	RATE	NUM	SLASH	time_unit
-- 
1.9.3

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux