From 0741f54b2ebab594dc58db6ca2bfb3c8f549e785 Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Wed, 27 Jan 2016 15:24:52 +0100 Subject: [PATCH] ntfsdump_logfile.c: Fix incorrectly parenthesized expression. On big-endian systems the result of the '!=' operation would be endian-swapped rather than the first argument (which must have been the intended action). --- ntfsprogs/ntfsdump_logfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsdump_logfile.c b/ntfsprogs/ntfsdump_logfile.c index 7fe22b3d..0d49aace 100644 --- a/ntfsprogs/ntfsdump_logfile.c +++ b/ntfsprogs/ntfsdump_logfile.c @@ -306,8 +306,8 @@ static void restart_header_sanity(RESTART_PAGE_HEADER *rstr, u8 *buf) "size. Cannot handle this yet.\n"); } /* Abort if the version number is not 1.1. */ - if (sle16_to_cpu(rstr->major_ver != 1) || - sle16_to_cpu(rstr->minor_ver != 1)) + if (sle16_to_cpu(rstr->major_ver) != 1 || + sle16_to_cpu(rstr->minor_ver) != 1) log_err_exit(buf, "Unknown $LogFile version %i.%i. Only know " "how to handle version 1.1.\n", sle16_to_cpu(rstr->major_ver), -- 2.11.0