Skip to content

Commit

Permalink
cmd/lxc_init: do not hide global variable
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner committed Nov 22, 2018
1 parent 479c79d commit e62f1fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lxc/cmd/lxc_init.c
Expand Up @@ -182,17 +182,17 @@ static void kill_children(pid_t pid)
}

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)
fprintf(stderr, "Failed to retrieve pid\n");
fclose(f);
return;
}

kill_children(pid);
kill(pid, SIGKILL);
(void)kill_children(find_pid);
(void)kill(find_pid, SIGKILL);
}

fclose(f);
Expand Down

0 comments on commit e62f1fe

Please sign in to comment.