quark

quark web server
git clone git://git.suckless.org/quark
Log | Files | Refs | LICENSE

commit b1dca4cf97d49750134fd98f0824f7913361c9c5
parent 03ee1df4c30bb6d6359381ebb7977ac08cd6b5dc
Author: Laslo Hunhold <dev@frign.de>
Date:   Sun,  9 Aug 2020 22:43:46 +0200

Remove three dead stores in main()

Signed-off-by: Laslo Hunhold <dev@frign.de>

Diffstat:
Mmain.c | 7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/main.c b/main.c @@ -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; @@ -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; @@ -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); @@ -397,7 +396,7 @@ main(int argc, char *argv[]) epledge("stdio", NULL); } - while ((wpid = wait(&status)) > 0) + while (wait(&status) > 0) ; }