diff options
author | Denis Vlasenko | 2007-01-27 22:21:12 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-01-27 22:21:12 +0000 |
commit | e06bed30cfcde7b9e320aff8a4c878c72416c4c4 (patch) | |
tree | da3276ab5bc224a64fb9f7d7d2a8a046816ec533 /networking/traceroute.c | |
parent | cd75a96f0f9d446028cad7e4b9b9224e009752e1 (diff) | |
download | busybox-e06bed30cfcde7b9e320aff8a4c878c72416c4c4.zip busybox-e06bed30cfcde7b9e320aff8a4c878c72416c4c4.tar.gz |
use bb_sanitize_stdio() where appropriate
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r-- | networking/traceroute.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c index 47775aa..25c6569 100644 --- a/networking/traceroute.c +++ b/networking/traceroute.c @@ -1040,10 +1040,8 @@ traceroute_main(int argc, char *argv[]) bb_show_usage(); } - /* Insure the socket fds won't be 0, 1 or 2 */ - do n = xopen(bb_dev_null, O_RDONLY); while (n < 2); - while (n > 2) - close(n--); + /* Ensure the socket fds won't be 0, 1 or 2 */ + bb_sanitize_stdio(); s = xsocket(AF_INET, SOCK_RAW, IPPROTO_ICMP); |