X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fmain.c;h=fad15c7c3f3d88443e16677724fdd4f3024b7161;hp=2741989c4864ac10cc5b3c8dbb3e18eb10db58b6;hb=a2a5291b3f5ab6ed4c92f51d0fd10a03047380d8;hpb=73381fcf54e38456067f0e87b8611a21eff99169 diff --git a/src/core/main.c b/src/core/main.c index 2741989c4..fad15c7c3 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -455,9 +455,8 @@ static int config_parse_cpu_affinity2( void *data, void *userdata) { - char *w; + const char *word, *state; size_t l; - char *state; cpu_set_t *c = NULL; unsigned ncpus = 0; @@ -465,12 +464,12 @@ static int config_parse_cpu_affinity2( assert(lvalue); assert(rvalue); - FOREACH_WORD_QUOTED(w, l, rvalue, state) { + FOREACH_WORD_QUOTED(word, l, rvalue, state) { char *t; int r; unsigned cpu; - if (!(t = strndup(w, l))) + if (!(t = strndup(word, l))) return log_oom(); r = safe_atou(t, &cpu); @@ -559,7 +558,7 @@ static int config_parse_join_controllers(const char *unit, void *userdata) { unsigned n = 0; - char *state, *w; + const char *word, *state; size_t length; assert(filename); @@ -568,10 +567,10 @@ static int config_parse_join_controllers(const char *unit, free_join_controllers(); - FOREACH_WORD_QUOTED(w, length, rvalue, state) { + FOREACH_WORD_QUOTED(word, length, rvalue, state) { char *s, **l; - s = strndup(w, length); + s = strndup(word, length); if (!s) return log_oom();