diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-02 10:48:06 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-02 10:48:06 +0000 |
commit | 04158e04591efea20f34c8dc83002e19056a5590 (patch) | |
tree | 1deace5081207ddefa831e024e5914a11a8aaeeb /runit/sv.c | |
parent | 512c8ae0537ad2ffcb70db03ca50b532781ae799 (diff) | |
download | busybox-w32-04158e04591efea20f34c8dc83002e19056a5590.tar.gz busybox-w32-04158e04591efea20f34c8dc83002e19056a5590.tar.bz2 busybox-w32-04158e04591efea20f34c8dc83002e19056a5590.zip |
udhcpd: add code which rejects lease files with suspicious or old timestamp.
*: s/time(0)/time(NULL)/g
Diffstat (limited to 'runit/sv.c')
-rw-r--r-- | runit/sv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runit/sv.c b/runit/sv.c index 7e5efdea9..20e86199a 100644 --- a/runit/sv.c +++ b/runit/sv.c | |||
@@ -445,7 +445,7 @@ int sv_main(int argc, char **argv) | |||
445 | service = argv; | 445 | service = argv; |
446 | services = argc - 1; | 446 | services = argc - 1; |
447 | 447 | ||
448 | tnow = time(0) + 0x400000000000000aULL; | 448 | tnow = time(NULL) + 0x400000000000000aULL; |
449 | tstart = tnow; | 449 | tstart = tnow; |
450 | curdir = open_read("."); | 450 | curdir = open_read("."); |
451 | if (curdir == -1) | 451 | if (curdir == -1) |
@@ -592,7 +592,7 @@ int sv_main(int argc, char **argv) | |||
592 | } | 592 | } |
593 | if (want_exit) break; | 593 | if (want_exit) break; |
594 | usleep(420000); | 594 | usleep(420000); |
595 | tnow = time(0) + 0x400000000000000aULL; | 595 | tnow = time(NULL) + 0x400000000000000aULL; |
596 | } | 596 | } |
597 | return rc > 99 ? 99 : rc; | 597 | return rc > 99 ? 99 : rc; |
598 | } | 598 | } |