X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fmachine%2Fmachine.c;h=13d3448adf47422ce66a6da43bfc82fd7e5de664;hb=aba248ee6b1eb10baf3d89eca2ad7569459af6ab;hp=0ed18d74ece89a8c0680e6f70b73a79ba0c74728;hpb=9b5ed6feda08290edce3bf916fa7362733dd30ea;p=elogind.git diff --git a/src/machine/machine.c b/src/machine/machine.c index 0ed18d74e..13d3448ad 100644 --- a/src/machine/machine.c +++ b/src/machine/machine.c @@ -291,14 +291,14 @@ int machine_load(Machine *m) { if (netif) { size_t l, allocated = 0, nr = 0; - char *w, *state; + const char *word, *state; int *ni = NULL; - FOREACH_WORD(w, l, netif, state) { + FOREACH_WORD(word, l, netif, state) { char buf[l+1]; int ifi; - *(char*) (mempcpy(buf, w, l)) = 0; + *(char*) (mempcpy(buf, word, l)) = 0; if (safe_atoi(buf, &ifi) < 0) continue; @@ -493,6 +493,8 @@ int machine_kill(Machine *m, KillWho who, int signo) { if (kill(m->leader, signo) < 0) return -errno; + + return 0; } /* Otherwise make PID 1 do it for us, for the entire cgroup */