]> git.proxmox.com Git - mirror_lxc.git/commitdiff
tests: remove dead assignments
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 10 Sep 2017 06:06:26 +0000 (08:06 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Sun, 24 Sep 2017 04:20:49 +0000 (00:20 -0400)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/tests/containertests.c
src/tests/destroytest.c
src/tests/saveconfig.c
src/tests/shortlived.c
src/tests/startone.c

index dbfccb1f41f31bec031d6ae7de9cf9c474d0ff1a..256ff60fdf9b8fb75b6f61b7dd57a3746179f184 100644 (file)
@@ -40,10 +40,8 @@ static int destroy_busybox(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);
@@ -72,10 +70,8 @@ static int create_busybox(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);
index eaf3c84d07c06e7eae527cc9081be8d1f1a97946..b8ba8055d78ede4082dd4bbb31c58638facea178 100644 (file)
@@ -38,10 +38,8 @@ static int create_container(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);
index d8a4ca271d6116ab94f3c8d49c524a1ab7b4a621..58f4d24b6f2c7dea97daf6663076515a7245ba17 100644 (file)
@@ -38,10 +38,8 @@ static int create_container(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);
index aff0e7d4f0a246790c2af12553f14f251fc74bac..6472ce7e0d37be2ebf61777aa0d30fda780af4ca 100644 (file)
@@ -40,10 +40,8 @@ static int destroy_container(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);
@@ -72,10 +70,8 @@ static int create_container(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);
index f875197032d13631254410e273c32e80d0dede2c..d8e82be8134de6e998960e879262904ff9b9c9cf 100644 (file)
@@ -40,10 +40,8 @@ static int destroy_container(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-destroy", "lxc-destroy", "-f", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);
@@ -72,10 +70,8 @@ static int create_container(void)
                return -1;
        }
        if (pid == 0) {
-               ret = execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
-               // Should not return
-               perror("execl");
-               exit(1);
+               execlp("lxc-create", "lxc-create", "-t", "busybox", "-n", MYNAME, NULL);
+               exit(EXIT_FAILURE);
        }
 again:
        ret = waitpid(pid, &status, 0);