summaryrefslogtreecommitdiff
path: root/networking/udhcp/common.c
diff options
context:
space:
mode:
authorDenis Vlasenko2006-11-18 22:03:26 +0000
committerDenis Vlasenko2006-11-18 22:03:26 +0000
commit61126ab30a90b74e45a79ccb97074ab71afa6054 (patch)
treecbc4d021bafef2561cbb37ea0d0c955bfd985401 /networking/udhcp/common.c
parent5a3395bc01cd4b11309595a6ecdaf32f8279f378 (diff)
downloadbusybox-61126ab30a90b74e45a79ccb97074ab71afa6054.zip
busybox-61126ab30a90b74e45a79ccb97074ab71afa6054.tar.gz
small fixes: using fd-based io instead of FILE*-based,
missed O_TRUNC, etc
Diffstat (limited to 'networking/udhcp/common.c')
-rw-r--r--networking/udhcp/common.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c
index 4c18e5d..3e916f4 100644
--- a/networking/udhcp/common.c
+++ b/networking/udhcp/common.c
@@ -29,9 +29,7 @@ long uptime(void)
*/
static inline void sanitize_fds(void)
{
- int fd = open(bb_dev_null, O_RDWR, 0);
- if (fd < 0)
- return;
+ int fd = xopen(bb_dev_null, O_RDWR);
while (fd < 3)
fd = dup(fd);
close(fd);