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 passwd *pwd = NULL;
struct rlimit rlim; struct rlimit rlim;
struct sockaddr_storage in_sa; struct sockaddr_storage in_sa;
pid_t cpid, wpid, spid;
size_t i; size_t i;
socklen_t in_sa_len; socklen_t in_sa_len;
int insock, status = 0, infd; 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) : insock = udsname ? sock_get_uds(udsname, pwd->pw_uid, grp->gr_gid) :
sock_get_ips(s.host, s.port); sock_get_ips(s.host, s.port);
switch (cpid = fork()) { switch (fork()) {
case -1: case -1:
warn("fork:"); warn("fork:");
break; break;
@ -371,7 +370,7 @@ main(int argc, char *argv[])
} }
/* fork and handle */ /* fork and handle */
switch ((spid = fork())) { switch (fork()) {
case 0: case 0:
serve(infd, &in_sa); serve(infd, &in_sa);
exit(0); exit(0);
@ -397,7 +396,7 @@ main(int argc, char *argv[])
epledge("stdio", NULL); epledge("stdio", NULL);
} }
while ((wpid = wait(&status)) > 0) while (wait(&status) > 0)
; ;
} }