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:
@@ -624,7 +624,7 @@ int vtnr_from_tty(const char *tty) {
|
||||
if (!startswith(tty, "tty") )
|
||||
return -EINVAL;
|
||||
|
||||
if (tty[3] < '0' || tty[3] > '9')
|
||||
if (!ascii_isdigit(tty[3]))
|
||||
return -EINVAL;
|
||||
|
||||
r = safe_atoi(tty+3, &i);
|
||||
|
||||
Reference in New Issue
Block a user