aboutsummaryrefslogtreecommitdiff
path: root/networking/udhcp/dhcpc.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/dhcpc.c
parent15d3f7f143127fa0a09cc6793ad5fba689cbc1a2 (diff)
downloadbusybox-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 '')
-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 8009bec04..028338ff3 100644
--- a/networking/udhcp/dhcpc.c
+++ b/networking/udhcp/dhcpc.c
@@ -310,7 +310,7 @@ int main(int argc, char *argv[])
310 310
311 for (;;) { 311 for (;;) {
312 312
313 tv.tv_sec = timeout - uptime(); 313 tv.tv_sec = timeout - time(NULL);
314 tv.tv_usec = 0; 314 tv.tv_usec = 0;
315 315
316 if (listen_mode != LISTEN_NONE && fd < 0) { 316 if (listen_mode != LISTEN_NONE && fd < 0) {
@@ -330,7 +330,7 @@ int main(int argc, char *argv[])
330 retval = select(max_fd + 1, &rfds, NULL, NULL, &tv); 330 retval = select(max_fd + 1, &rfds, NULL, NULL, &tv);
331 } else retval = 0; /* If we already timed out, fall through */ 331 } else retval = 0; /* If we already timed out, fall through */
332 332
333 now = uptime(); 333 now = time(NULL);
334 if (retval == 0) { 334 if (retval == 0) {
335 /* timeout dropped to zero */ 335 /* timeout dropped to zero */
336 switch (state) { 336 switch (state) {