]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxc_usernsexec: remove dead assignments
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 10 Sep 2017 06:03:06 +0000 (08:03 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Wed, 4 Oct 2017 23:10:28 +0000 (19:10 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxc_usernsexec.c

index 6745ac308635d4fdeef5817c83fe2f12558fab39..bad70a155e5014304e5b447b2e9281ec852e63be 100644 (file)
@@ -316,10 +316,8 @@ int main(int argc, char *argv[])
 
        argv = &argv[optind];
        argc = argc - optind;
-       if (argc < 1) {
+       if (argc < 1)
                argv = default_args;
-               argc = 1;
-       }
 
        if (pipe(pipe1) < 0 || pipe(pipe2) < 0) {
                perror("pipe");
@@ -367,10 +365,9 @@ int main(int argc, char *argv[])
 
        buf[0] = '1';
 
-       if (lxc_map_ids(&active_map, pid)) {
+       if (lxc_map_ids(&active_map, pid))
                fprintf(stderr, "error mapping child\n");
-               ret = 0;
-       }
+
        if (write(pipe2[1], buf, 1) < 0) {
                perror("write to pipe");
                exit(1);