diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-18 22:03:26 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-11-18 22:03:26 +0000 |
commit | 61126ab30a90b74e45a79ccb97074ab71afa6054 (patch) | |
tree | cbc4d021bafef2561cbb37ea0d0c955bfd985401 /networking/udhcp/common.c | |
parent | 5a3395bc01cd4b11309595a6ecdaf32f8279f378 (diff) | |
download | busybox-w32-61126ab30a90b74e45a79ccb97074ab71afa6054.tar.gz busybox-w32-61126ab30a90b74e45a79ccb97074ab71afa6054.tar.bz2 busybox-w32-61126ab30a90b74e45a79ccb97074ab71afa6054.zip |
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.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 4c18e5d51..3e916f422 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
@@ -29,9 +29,7 @@ long uptime(void) | |||
29 | */ | 29 | */ |
30 | static inline void sanitize_fds(void) | 30 | static inline void sanitize_fds(void) |
31 | { | 31 | { |
32 | int fd = open(bb_dev_null, O_RDWR, 0); | 32 | int fd = xopen(bb_dev_null, O_RDWR); |
33 | if (fd < 0) | ||
34 | return; | ||
35 | while (fd < 3) | 33 | while (fd < 3) |
36 | fd = dup(fd); | 34 | fd = dup(fd); |
37 | close(fd); | 35 | close(fd); |