]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
src/logoutd.c: Remove unused variable
authorAlejandro Colomar <alx@kernel.org>
Mon, 13 May 2024 21:18:19 +0000 (23:18 +0200)
committerSerge Hallyn <serge@hallyn.com>
Tue, 2 Jul 2024 02:40:11 +0000 (21:40 -0500)
wait(2) accepts NULL if the status won't be read.  Simplify.

Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/logoutd.c

index 19bcb7457a9603737b03535e971effc122507116..d1b30897f4b880db76f5141f5a14e636ce765f07 100644 (file)
@@ -121,7 +121,6 @@ int
 main(int argc, char **argv)
 {
        int    i;
-       int    status;
        pid_t  pid;
 
        struct utmpx  *ut;
@@ -251,7 +250,7 @@ main(int argc, char **argv)
                /*
                 * Reap any dead babies ...
                 */
-               while (wait (&status) != -1);
+               while (wait(NULL) != -1);
        }
 
        return EXIT_FAILURE;