From 6aaaa63519c88c872f15dcc639643103b563b1c6 Mon Sep 17 00:00:00 2001 From: "Ondrej Zajicek (work)" Date: Tue, 23 May 2017 17:22:53 +0200 Subject: Change parser to handle numbers as unsigned Lexer always parsed numbers as unsigned, but parser handled them as signed and grammar contained many unnecessary checks for negativity. --- proto/rip/config.Y | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'proto/rip/config.Y') diff --git a/proto/rip/config.Y b/proto/rip/config.Y index 25c2ac7a..46f6c177 100644 --- a/proto/rip/config.Y +++ b/proto/rip/config.Y @@ -65,7 +65,7 @@ rip_proto_item: proto_item | proto_channel | ECMP bool { RIP_CFG->ecmp = $2 ? RIP_DEFAULT_ECMP_LIMIT : 0; } - | ECMP bool LIMIT expr { RIP_CFG->ecmp = $2 ? $4 : 0; if ($4 < 0) cf_error("ECMP limit cannot be negative"); } + | ECMP bool LIMIT expr { RIP_CFG->ecmp = $2 ? $4 : 0; } | INFINITY expr { RIP_CFG->infinity = $2; } | INTERFACE rip_iface ; -- cgit v1.2.3