diff options
author | Omar Polo <op@omarpolo.com> | 2021-02-03 16:53:34 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2021-02-03 16:53:34 +0000 |
commit | e824d03efa218415d3625d14d168dfc954b39ef6 (patch) | |
tree | 68991e34bf1d6b035928c687e36ba8df821f37c7 /gmid.c | |
parent | 4e2e2ab1d3ac93821434c5e7723ffbcda1b0aee4 (diff) |
drop unnecessary check around close
Diffstat (limited to 'gmid.c')
-rw-r--r-- | gmid.c | 10 |
1 files changed, 2 insertions, 8 deletions
@@ -490,20 +490,14 @@ serve(int argc, char **argv, int *p) fatal("fork: %s", strerror(errno)); case 0: /* child */ - if (p[0] != -1) { - close(p[0]); - p[0] = -1; - } + close(p[0]); exfd = p[1]; drop_priv(); listener_main(); _exit(0); default: /* parent */ - if (p[1] != -1) { - close(p[1]); - p[1] = -1; - } + close(p[1]); exfd = p[0]; drop_priv(); return executor_main(); |