tree-wide: use ALPHANUMERICAL where appropriate

Prompted by 43116c5662
This commit is contained in:
Mike Yuan
2026-03-04 07:36:10 +09:00
committed by Yu Watanabe
parent 3e7b9b7462
commit 085f92730a
6 changed files with 8 additions and 9 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
/* We follow bash for the character set. Different shells have different rules. */
#define VALID_BASH_ENV_NAME_CHARS \
DIGITS LETTERS \
ALPHANUMERICAL \
"_"
size_t sc_arg_max(void) {
+1 -1
View File
@@ -10,7 +10,7 @@ bool session_id_valid(const char *id) {
if (isempty(id))
return false;
return id[strspn(id, LETTERS DIGITS)] == '\0';
return in_charset(id, ALPHANUMERICAL);
}
bool logind_running(void) {
+1 -2
View File
@@ -17,8 +17,7 @@
/* Characters valid in a unit name. */
#define VALID_CHARS \
DIGITS \
LETTERS \
ALPHANUMERICAL \
":-_.\\"
/* The same, but also permits the single @ character that may appear */