summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2012-11-14 10:45:14 +0000
committerRoy Marples <roy@marples.name>2012-11-14 10:45:14 +0000
commit3495524d98aa3384f938e0366d90c32b96d9643d (patch)
treeef2239300c3ced53168006cb02fef612620dee32
parentb0d47a8e49d4327805abfb329faf6f28c287fa00 (diff)
downloaddhcpcd-3495524d98aa3384f938e0366d90c32b96d9643d.tar.xz
Always close this fd
-rw-r--r--bind.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/bind.c b/bind.c
index 30e639ac..c1e57a4a 100644
--- a/bind.c
+++ b/bind.c
@@ -90,8 +90,7 @@ daemonise(void)
dup2(fd, STDIN_FILENO);
dup2(fd, STDOUT_FILENO);
dup2(fd, STDERR_FILENO);
- if (fd > STDERR_FILENO)
- close(fd);
+ close(fd);
}
break;
default: