]> git.proxmox.com Git - mirror_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:20:44 +0000 (00:20 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/tools/lxc_usernsexec.c

index 86e9c40275e52c505aa10edc5942c0ad2b0aed9b..acba38da681896a633f013efa70e5786f383ce78 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);