summaryrefslogtreecommitdiff
path: root/src/shared/device-nodes.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2022-07-05 11:55:26 +0200
committerLennart Poettering <lennart@poettering.net>2022-07-05 14:25:07 +0200
commitff25d3385dfbf493c878c9e227df56db3dc10b6a (patch)
treea4302f4eb82e157abfa94c3045a65abeafdbb3af /src/shared/device-nodes.c
parent82c3a0b74c8decccf2e1e384e7ad02def4a07459 (diff)
downloadsystemd-ff25d3385dfbf493c878c9e227df56db3dc10b6a.tar.gz
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: 8d9156660d6958c8d63b1d44692968f1b5d33920
Diffstat (limited to 'src/shared/device-nodes.c')
-rw-r--r--src/shared/device-nodes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/shared/device-nodes.c b/src/shared/device-nodes.c
index ec5613ac58..40e469379f 100644
--- a/src/shared/device-nodes.c
+++ b/src/shared/device-nodes.c
@@ -5,13 +5,13 @@
#include <string.h>
#include "device-nodes.h"
+#include "string-util.h"
#include "utf8.h"
int allow_listed_char_for_devnode(char c, const char *white) {
return
- (c >= '0' && c <= '9') ||
- (c >= 'A' && c <= 'Z') ||
- (c >= 'a' && c <= 'z') ||
+ ascii_isdigit(c) ||
+ ascii_isalpha(c) ||
strchr("#+-.:=@_", c) ||
(white && strchr(white, c));
}