[hackers] [quark] Remove three dead stores in main() || Laslo Hunhold

From: <git_AT_suckless.org>
Date: Sun, 9 Aug 2020 23:04:05 +0200 (CEST)

commit b1dca4cf97d49750134fd98f0824f7913361c9c5
Author: Laslo Hunhold <dev_AT_frign.de>
AuthorDate: Sun Aug 9 22:43:46 2020 +0200
Commit: Laslo Hunhold <dev_AT_frign.de>
CommitDate: Sun Aug 9 22:43:46 2020 +0200

    Remove three dead stores in main()
    
    Signed-off-by: Laslo Hunhold <dev_AT_frign.de>

diff --git a/main.c b/main.c
index 6dbb088..92b8214 100644
--- a/main.c
+++ b/main.c
_AT_@ -178,7 +178,6 @@ main(int argc, char *argv[])
         struct passwd *pwd = NULL;
         struct rlimit rlim;
         struct sockaddr_storage in_sa;
- pid_t cpid, wpid, spid;
         size_t i;
         socklen_t in_sa_len;
         int insock, status = 0, infd;
_AT_@ -312,7 +311,7 @@ main(int argc, char *argv[])
         insock = udsname ? sock_get_uds(udsname, pwd->pw_uid, grp->gr_gid) :
                            sock_get_ips(s.host, s.port);
 
- switch (cpid = fork()) {
+ switch (fork()) {
         case -1:
                 warn("fork:");
                 break;
_AT_@ -371,7 +370,7 @@ main(int argc, char *argv[])
                         }
 
                         /* fork and handle */
- switch ((spid = fork())) {
+ switch (fork()) {
                         case 0:
                                 serve(infd, &in_sa);
                                 exit(0);
_AT_@ -397,7 +396,7 @@ main(int argc, char *argv[])
                         epledge("stdio", NULL);
                 }
 
- while ((wpid = wait(&status)) > 0)
+ while (wait(&status) > 0)
                         ;
         }
 
Received on Sun Aug 09 2020 - 23:04:05 CEST

This archive was generated by hypermail 2.3.0 : Sun Aug 09 2020 - 23:12:34 CEST