From 94589cde036d77842565d03e87b3c52bd574e126 Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Thu, 28 Jan 2016 08:28:31 +0100 Subject: [PATCH] Replace all sle16 usage of the '==' operation with "sle16_eq(...)". --- include/ntfs-3g/endians.h | 2 ++ libntfs-3g/volume.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/include/ntfs-3g/endians.h b/include/ntfs-3g/endians.h index eea88b69..291eccec 100644 --- a/include/ntfs-3g/endians.h +++ b/include/ntfs-3g/endians.h @@ -302,4 +302,6 @@ #define le64_eq(a, b) ((a) == (b)) +#define sle16_eq(a, b) ((a) == (b)) + #endif /* defined _NTFS_ENDIANS_H */ diff --git a/libntfs-3g/volume.c b/libntfs-3g/volume.c index edd76979..cccec09b 100644 --- a/libntfs-3g/volume.c +++ b/libntfs-3g/volume.c @@ -675,8 +675,8 @@ static int ntfs_volume_check_logfile(ntfs_volume *vol) * after such an event. */ if (rp - && (rp->major_ver == const_cpu_to_le16(2)) - && (rp->minor_ver == const_cpu_to_le16(0))) { + && sle16_eq(rp->major_ver, const_cpu_to_sle16(2)) + && sle16_eq(rp->minor_ver, const_cpu_to_sle16(0))) { ntfs_log_error("Metadata kept in Windows cache, refused to mount.\n"); err = EPERM; }