diff options
author | Rob Landley <rob@landley.net> | 2005-05-04 00:38:15 +0000 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2005-05-04 00:38:15 +0000 |
commit | 8b80c71d70f6f063f01864d2363a235aa1d730cf (patch) | |
tree | caa49bdf0255fe00bbf30f6f1b69b0054b23522f /networking/udhcp/arpping.c | |
parent | 15d3f7f143127fa0a09cc6793ad5fba689cbc1a2 (diff) | |
download | busybox-w32-8b80c71d70f6f063f01864d2363a235aa1d730cf.tar.gz busybox-w32-8b80c71d70f6f063f01864d2363a235aa1d730cf.tar.bz2 busybox-w32-8b80c71d70f6f063f01864d2363a235aa1d730cf.zip |
Patch from Shaun Jackman:
Replace uptime with time(NULL). time is more portable than uptime and
eliminates the need to define uptime, reducing code size slightly.
Diffstat (limited to 'networking/udhcp/arpping.c')
-rw-r--r-- | networking/udhcp/arpping.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/networking/udhcp/arpping.c b/networking/udhcp/arpping.c index 7cc2be42e..da01ddd71 100644 --- a/networking/udhcp/arpping.c +++ b/networking/udhcp/arpping.c | |||
@@ -79,7 +79,7 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface) | |||
79 | 79 | ||
80 | /* wait arp reply, and check it */ | 80 | /* wait arp reply, and check it */ |
81 | tm.tv_usec = 0; | 81 | tm.tv_usec = 0; |
82 | prevTime = uptime(); | 82 | prevTime = time(NULL); |
83 | while (timeout > 0) { | 83 | while (timeout > 0) { |
84 | FD_ZERO(&fdset); | 84 | FD_ZERO(&fdset); |
85 | FD_SET(s, &fdset); | 85 | FD_SET(s, &fdset); |
@@ -97,8 +97,8 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface) | |||
97 | break; | 97 | break; |
98 | } | 98 | } |
99 | } | 99 | } |
100 | timeout -= uptime() - prevTime; | 100 | timeout -= time(NULL) - prevTime; |
101 | prevTime = uptime(); | 101 | prevTime = time(NULL); |
102 | } | 102 | } |
103 | close(s); | 103 | close(s); |
104 | DEBUG(LOG_INFO, "%salid arp replies for this address", rv ? "No v" : "V"); | 104 | DEBUG(LOG_INFO, "%salid arp replies for this address", rv ? "No v" : "V"); |