summaryrefslogtreecommitdiffstats
path: root/usr.sbin/mtree/compare.c
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-09-24 16:52:42 +0000
committerdg <dg@FreeBSD.org>1994-09-24 16:52:42 +0000
commit4673798b34a219c6208231fb6ae0e31e58abc89d (patch)
treede4ad654809df93839b3b7ec6fcb95f13a084590 /usr.sbin/mtree/compare.c
parent89b0add9b2e5440baeee0f18201354f7ae400b15 (diff)
downloadFreeBSD-src-4673798b34a219c6208231fb6ae0e31e58abc89d.zip
FreeBSD-src-4673798b34a219c6208231fb6ae0e31e58abc89d.tar.gz
Fixed bug caused by missing set of paranthesis when checking the modification
time. This caused differences in the nanosecond portion of the time to screwup the logic and made mtree think it should compare the modtime even though "time" wasn't specified. The end result is that mtree couldn't deal with procfs because procfs sets the mtime with high accuracy via microtime().
Diffstat (limited to 'usr.sbin/mtree/compare.c')
-rw-r--r--usr.sbin/mtree/compare.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/mtree/compare.c b/usr.sbin/mtree/compare.c
index 166fb5b..c8740fc 100644
--- a/usr.sbin/mtree/compare.c
+++ b/usr.sbin/mtree/compare.c
@@ -169,9 +169,9 @@ typeerr: LABEL;
* XXX
* Catches nano-second differences, but doesn't display them.
*/
- if ((s->flags & F_TIME &&
- s->st_mtimespec.ts_sec != p->fts_statp->st_mtimespec.ts_sec) ||
- (s->st_mtimespec.ts_nsec != p->fts_statp->st_mtimespec.ts_nsec)) {
+ if ((s->flags & F_TIME) &&
+ ((s->st_mtimespec.ts_sec != p->fts_statp->st_mtimespec.ts_sec) ||
+ (s->st_mtimespec.ts_nsec != p->fts_statp->st_mtimespec.ts_nsec))) {
LABEL;
(void)printf("%smodification time (%.24s, ",
tab, ctime(&s->st_mtimespec.ts_sec));
OpenPOWER on IntegriCloud