]> 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>
Sun, 24 Sep 2017 04:39:28 +0000 (00:39 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/tools/lxc_usernsexec.c

index 7fd2acabb9f9c4d4e1a6c1f5d1c4e3706e345561..97ca26bdc23ee3a5d37cb38c59e9bc784247c1c6 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(EXIT_FAILURE);