summaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.c
diff options
context:
space:
mode:
authorRob Landley2005-05-04 00:38:15 +0000
committerRob Landley2005-05-04 00:38:15 +0000
commit8b80c71d70f6f063f01864d2363a235aa1d730cf (patch)
treecaa49bdf0255fe00bbf30f6f1b69b0054b23522f /networking/udhcp/dhcpc.c
parent15d3f7f143127fa0a09cc6793ad5fba689cbc1a2 (diff)
downloadbusybox-8b80c71d70f6f063f01864d2363a235aa1d730cf.zip
busybox-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/dhcpc.c')
-rw-r--r--networking/udhcp/dhcpc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c
index 8009bec..028338f 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -310,7 +310,7 @@ int main(int argc, char *argv[])
for (;;) {
- tv.tv_sec = timeout - uptime();
+ tv.tv_sec = timeout - time(NULL);
tv.tv_usec = 0;
if (listen_mode != LISTEN_NONE && fd < 0) {
@@ -330,7 +330,7 @@ int main(int argc, char *argv[])
retval = select(max_fd + 1, &rfds, NULL, NULL, &tv);
} else retval = 0; /* If we already timed out, fall through */
- now = uptime();
+ now = time(NULL);
if (retval == 0) {
/* timeout dropped to zero */
switch (state) {