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>
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)