Remove three dead stores in main()

Signed-off-by: Laslo Hunhold <dev@frign.de>
This commit is contained in:
Laslo Hunhold 2020-08-09 22:43:46 +02:00
parent 03ee1df4c3
commit b1dca4cf97
No known key found for this signature in database
GPG key ID: 69576BD24CFCB980

7
main.c
View file

@ -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)
;
}