Replace all sle16 usage of the '!=' operation with "!sle16_eq(...)".

edge.strict_endians
Erik Larsson 2016-01-28 08:28:32 +01:00
parent 94589cde03
commit e1bd02ed74
2 changed files with 6 additions and 6 deletions

View File

@ -90,10 +90,10 @@ static BOOL ntfs_check_restart_page_header(RESTART_PAGE_HEADER *rp, s64 pos)
* Windows 8, and we will refuse to mount.
* Nevertheless, do all the relevant checks before rejecting.
*/
if (((rp->major_ver != const_cpu_to_le16(1))
|| (rp->minor_ver != const_cpu_to_le16(1)))
&& ((rp->major_ver != const_cpu_to_le16(2))
|| (rp->minor_ver != const_cpu_to_le16(0)))) {
if ((!sle16_eq(rp->major_ver, const_cpu_to_le16(1))
|| !sle16_eq(rp->minor_ver, const_cpu_to_le16(1)))
&& (!sle16_eq(rp->major_ver, const_cpu_to_le16(2))
|| !sle16_eq(rp->minor_ver, const_cpu_to_le16(0)))) {
ntfs_log_error("$LogFile version %i.%i is not "
"supported.\n (This driver supports version "
"1.1 and 2.0 only.)\n",

View File

@ -511,8 +511,8 @@ rstr_pass_loc:
* The $LogFile versions specified in each of the two restart
* page headers must match.
*/
if (rstr1->major_ver != rstr->major_ver ||
rstr1->minor_ver != rstr->minor_ver)
if (!sle16_eq(rstr1->major_ver, rstr->major_ver) ||
!sle16_eq(rstr1->minor_ver, rstr->minor_ver))
log_err_exit(buf, "Second restart area specifies "
"different $LogFile version to first "
"restart area. Cannot handle this "