aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/arpping.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2005-05-04 00:38:15 +0000
committerRob Landley <rob@landley.net>2005-05-04 00:38:15 +0000
commit8b80c71d70f6f063f01864d2363a235aa1d730cf (patch)
treecaa49bdf0255fe00bbf30f6f1b69b0054b23522f /networking/udhcp/arpping.c
parent15d3f7f143127fa0a09cc6793ad5fba689cbc1a2 (diff)
downloadbusybox-8b80c71d70f6f063f01864d2363a235aa1d730cf.tar.gz
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.c6
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)
/* wait arp reply, and check it */
tm.tv_usec = 0;
- prevTime = uptime();
+ prevTime = time(NULL);
while (timeout > 0) {
FD_ZERO(&fdset);
FD_SET(s, &fdset);
@@ -97,8 +97,8 @@ int arpping(uint32_t yiaddr, uint32_t ip, uint8_t *mac, char *interface)
break;
}
}
- timeout -= uptime() - prevTime;
- prevTime = uptime();
+ timeout -= time(NULL) - prevTime;
+ prevTime = time(NULL);
}
close(s);
DEBUG(LOG_INFO, "%salid arp replies for this address", rv ? "No v" : "V");