chiark / gitweb /
cryptsetup: fix OOM handling when parsing mount options
[elogind.git] / src / shared / env-util.c
index d3d4c59ab9755abb078315c3a85cf8b0874fdbaf..5e29629efdb6fce48c61fd59653261de4a4a76ce 100644 (file)
 #include "utf8.h"
 #include "util.h"
 #include "env-util.h"
+#include "def.h"
 
 #define VALID_CHARS_ENV_NAME                    \
-        "0123456789"                            \
-        "abcdefghijklmnopqrstuvwxyz"            \
-        "ABCDEFGHIJKLMNOPQRSTUVWXYZ"            \
+        DIGITS LETTERS                          \
         "_"
 
 #ifndef ARG_MAX
@@ -227,7 +226,7 @@ fail:
         return NULL;
 }
 
-static bool env_match(const char *t, const char *pattern) {
+_pure_ static bool env_match(const char *t, const char *pattern) {
         assert(t);
         assert(pattern);