]> git.proxmox.com Git - mirror_frr.git/commitdiff
bgpd: Remove unnecessary all_digit() call
authorDonald Sharp <sharpd@nvidia.com>
Tue, 14 Feb 2023 20:26:44 +0000 (15:26 -0500)
committerDonald Sharp <sharpd@nvidia.com>
Tue, 14 Feb 2023 20:26:44 +0000 (15:26 -0500)
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 <sharpd@nvidia.com>
bgpd/bgp_routemap.c

index 5aa3ec4fd168b53b298cde1433ec59f6b9fe86af..a1134bc2e692c8870b6eb462f4247801f37c6133 100644 (file)
@@ -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)