From 7e9199f684d4e9f22e717ab7f981ade6dfed00c8 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 14 Feb 2023 15:26:44 -0500 Subject: [PATCH] bgpd: Remove unnecessary all_digit() call The call for all_digit is unnecessary as that the local preference must be entered as a digit. In other words you cannot get to this point without the string being all digits. This check is unnecessary. Signed-off-by: Donald Sharp --- bgpd/bgp_routemap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 5aa3ec4fd1..a1134bc2e6 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -1403,10 +1403,6 @@ static void *route_match_local_pref_compile(const char *arg) char *endptr = NULL; unsigned long tmpval; - /* Locpref value shoud be integer. */ - if (!all_digit(arg)) - return NULL; - errno = 0; tmpval = strtoul(arg, &endptr, 10); if (*endptr != '\0' || errno || tmpval > UINT32_MAX)