chiark / gitweb /
Reject invalid quoted strings
[elogind.git] / src / udev / net / link-config.c
index 512885f9c8604ced0757f4dd476133e7b3ab9dc8..946715ce5a106911819982898beab5329b813a52 100644 (file)
@@ -193,7 +193,7 @@ static int load_link(link_config_ctx *ctx, const char *filename) {
 
 static bool enable_name_policy(void) {
         _cleanup_free_ char *line = NULL;
-        char *w, *state;
+        const char *word, *state;
         int r;
         size_t l;
 
@@ -203,8 +203,8 @@ static bool enable_name_policy(void) {
         if (r <= 0)
                 return true;
 
-        FOREACH_WORD_QUOTED(w, l, line, state)
-                if (strneq(w, "net.ifnames=0", l))
+        FOREACH_WORD_QUOTED(word, l, line, state)
+                if (strneq(word, "net.ifnames=0", l))
                         return false;
 
         return true;