From: Theodore Ts'o Date: Thu, 1 Sep 2016 04:13:38 +0000 (-0400) Subject: e2fsck: fix logic for deciding when to repair legacy timestamp encodings X-Git-Tag: v1.43.2~3 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=35a4e1b1c5cbb493842be6f901b155a9b4489b12;p=tools%2Fe2fsprogs.git e2fsck: fix logic for deciding when to repair legacy timestamp encodings A static code checker noticed that we had a redundant condition: if (((sizeof(time_t) <= 4) || ((sizeof(time_t) > 4) && which was caused by the parenthesis were in the wrong place. Signed-off-by: Theodore Ts'o --- diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index a4ae38a..8623063 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -512,8 +512,8 @@ static void check_inode_extra_space(e2fsck_t ctx, struct problem_context *pctx) * If the inode's extended atime (ctime, crtime, mtime) is stored in * the old, invalid format, repair it. */ - if (((sizeof(time_t) <= 4) || - ((sizeof(time_t) > 4) && + if ((sizeof(time_t) <= 4) || + (((sizeof(time_t) > 4) && ctx->now < EXT4_EXTRA_NEGATIVE_DATE_CUTOFF)) && (CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, atime) || CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, ctime) ||