summaryrefslogtreecommitdiff
path: root/e2fsprogs/old_e2fsprogs/blkid
diff options
context:
space:
mode:
authorDenis Vlasenko2009-02-02 10:48:06 +0000
committerDenis Vlasenko2009-02-02 10:48:06 +0000
commit04158e04591efea20f34c8dc83002e19056a5590 (patch)
tree1deace5081207ddefa831e024e5914a11a8aaeeb /e2fsprogs/old_e2fsprogs/blkid
parent512c8ae0537ad2ffcb70db03ca50b532781ae799 (diff)
downloadbusybox-04158e04591efea20f34c8dc83002e19056a5590.zip
busybox-04158e04591efea20f34c8dc83002e19056a5590.tar.gz
udhcpd: add code which rejects lease files with suspicious or old timestamp.
*: s/time(0)/time(NULL)/g
Diffstat (limited to 'e2fsprogs/old_e2fsprogs/blkid')
-rw-r--r--e2fsprogs/old_e2fsprogs/blkid/devname.c4
-rw-r--r--e2fsprogs/old_e2fsprogs/blkid/probe.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/e2fsprogs/old_e2fsprogs/blkid/devname.c b/e2fsprogs/old_e2fsprogs/blkid/devname.c
index 5b9e48f..348e5d4 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/devname.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/devname.c
@@ -273,7 +273,7 @@ int blkid_probe_all(blkid_cache cache)
return -BLKID_ERR_PARAM;
if (cache->bic_flags & BLKID_BIC_FL_PROBED &&
- time(0) - cache->bic_time < BLKID_PROBE_INTERVAL)
+ time(NULL) - cache->bic_time < BLKID_PROBE_INTERVAL)
return 0;
blkid_read_cache(cache);
@@ -335,7 +335,7 @@ int blkid_probe_all(blkid_cache cache)
fclose(proc);
- cache->bic_time = time(0);
+ cache->bic_time = time(NULL);
cache->bic_flags |= BLKID_BIC_FL_PROBED;
blkid_flush_cache(cache);
return 0;
diff --git a/e2fsprogs/old_e2fsprogs/blkid/probe.c b/e2fsprogs/old_e2fsprogs/blkid/probe.c
index 48b240e..1f7188e 100644
--- a/e2fsprogs/old_e2fsprogs/blkid/probe.c
+++ b/e2fsprogs/old_e2fsprogs/blkid/probe.c
@@ -562,7 +562,7 @@ blkid_dev blkid_verify(blkid_cache cache, blkid_dev dev)
if (!dev)
return NULL;
- now = time(0);
+ now = time(NULL);
diff = now - dev->bid_time;
if ((now < dev->bid_time) ||
@@ -659,7 +659,7 @@ try_again:
found_type:
if (dev && type) {
dev->bid_devno = st.st_rdev;
- dev->bid_time = time(0);
+ dev->bid_time = time(NULL);
dev->bid_flags |= BLKID_BID_FL_VERIFIED;
cache->bic_flags |= BLKID_BIC_FL_CHANGED;