]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cmd/lxc_init: do not hide global variable
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 20 Oct 2018 09:49:47 +0000 (11:49 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Mon, 22 Oct 2018 14:48:37 +0000 (16:48 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cmd/lxc_init.c

index d50868a137f84a833fa3ef4bfecf978c3fe80557..e7daa7863d9410104e805b22cf7497ab85bf4699 100644 (file)
@@ -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);