tree-wide: add global ascii_isdigit() + ascii_isalpha()
We now have a local implementation in string-util-fundamental.c, but
it's useful at a lot of other places, hence let's give it a more
expressive name and share it across the tree.
Follow-up for: 8d9156660d
This commit is contained in:
@@ -833,7 +833,7 @@ bool ifname_valid_full(const char *p, IfnameValidFlags flags) {
|
||||
if (!ifname_valid_char(*t))
|
||||
return false;
|
||||
|
||||
numeric = numeric && (*t >= '0' && *t <= '9');
|
||||
numeric = numeric && ascii_isdigit(*t);
|
||||
}
|
||||
|
||||
/* It's fully numeric but didn't parse as valid ifindex above? if so, it must be too large or zero or
|
||||
|
||||
Reference in New Issue
Block a user