summaryrefslogtreecommitdiff
path: root/src/libudev/cgroup-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libudev/cgroup-util.c')
-rw-r--r--src/libudev/cgroup-util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/libudev/cgroup-util.c b/src/libudev/cgroup-util.c
index 71bd529ad2..af6ce959c1 100644
--- a/src/libudev/cgroup-util.c
+++ b/src/libudev/cgroup-util.c
@@ -198,7 +198,7 @@ static int join_path(const char *controller, const char *path, const char *suffi
int cg_get_path(const char *controller, const char *path, const char *suffix, char **fs) {
const char *p;
- static __thread bool good = false;
+ static thread_local bool good = false;
assert(fs);
@@ -223,9 +223,7 @@ int cg_get_path(const char *controller, const char *path, const char *suffix, ch
#define CONTROLLER_VALID \
- "0123456789" \
- "abcdefghijklmnopqrstuvwxyz" \
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ" \
+ DIGITS LETTERS \
"_"
bool cg_controller_is_valid(const char *p, bool allow_named) {