cmd/lxc_init: do not hide global variable

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-10-20 11:49:47 +02:00
parent 489b0b2913
commit c837120231
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -182,17 +182,17 @@ static void kill_children(pid_t pid)
} }
while (!feof(f)) { while (!feof(f)) {
pid_t pid; pid_t find_pid;
if (fscanf(f, "%d ", &pid) != 1) { if (fscanf(f, "%d ", &find_pid) != 1) {
if (my_args.quiet) if (my_args.quiet)
fprintf(stderr, "Failed to retrieve pid\n"); fprintf(stderr, "Failed to retrieve pid\n");
fclose(f); fclose(f);
return; return;
} }
kill_children(pid); (void)kill_children(find_pid);
kill(pid, SIGKILL); (void)kill(find_pid, SIGKILL);
} }
fclose(f); fclose(f);