diff options
| author | Ruslan Ermilov <ru@FreeBSD.org> | 2001-09-14 13:42:26 +0000 |
|---|---|---|
| committer | Ruslan Ermilov <ru@FreeBSD.org> | 2001-09-14 13:42:26 +0000 |
| commit | 631a876574bbbc8d1bae934c96fcad0ec29a6f18 (patch) | |
| tree | 3b513c9f5796077111f2509be1b762fd70c7b2b5 /usr.bin | |
| parent | adff4fca3dc53af29a7a4d04d4b8f53ba247a3c3 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/find/function.c | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index b477f20cf5e5..bfe6a6d2c1cc 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -302,32 +302,19 @@ f_Xtime(plan, entry) FTSENT *entry; { extern time_t now; - int exact_time; + time_t xtime; - exact_time = plan->flags & F_EXACTTIME; + if (plan->flags & F_TIME_A) + xtime = entry->fts_statp->st_atime; + else if (plan->flags & F_TIME_C) + xtime = entry->fts_statp->st_ctime; + else + xtime = entry->fts_statp->st_mtime; - if (plan->flags & F_TIME_C) { - if (exact_time) - COMPARE(now - entry->fts_statp->st_ctime, - plan->t_data); - else - COMPARE((now - entry->fts_statp->st_ctime + - 86400 - 1) / 86400, plan->t_data); - } else if (plan->flags & F_TIME_A) { - if (exact_time) - COMPARE(now - entry->fts_statp->st_atime, - plan->t_data); - else - COMPARE((now - entry->fts_statp->st_atime + - 86400 - 1) / 86400, plan->t_data); - } else { - if (exact_time) - COMPARE(now - entry->fts_statp->st_mtime, - plan->t_data); - else - COMPARE((now - entry->fts_statp->st_mtime + - 86400 - 1) / 86400, plan->t_data); - } + if (plan->flags & F_EXACTTIME) + COMPARE(now - xtime, plan->t_data); + else + COMPARE((now - xtime + 86400 - 1) / 86400, plan->t_data); } PLAN * |
