diff --git a/libntfs-3g/bootsect.c b/libntfs-3g/bootsect.c index 29450e1f..f867027e 100644 --- a/libntfs-3g/bootsect.c +++ b/libntfs-3g/bootsect.c @@ -65,7 +65,7 @@ BOOL ntfs_boot_sector_is_ntfs(NTFS_BOOT_SECTOR *b) ntfs_log_debug("Beginning bootsector check.\n"); ntfs_log_debug("Checking OEMid, NTFS signature.\n"); - if (b->oem_id != const_cpu_to_le64(0x202020205346544eULL)) { /* "NTFS " */ + if (!le64_eq(b->oem_id, const_cpu_to_le64(0x202020205346544eULL))) { /* "NTFS " */ ntfs_log_error("NTFS signature is missing.\n"); goto not_ntfs; } diff --git a/ntfsprogs/ntfsck.c b/ntfsprogs/ntfsck.c index b0bca401..2a8ad3df 100644 --- a/ntfsprogs/ntfsck.c +++ b/ntfsprogs/ntfsck.c @@ -209,7 +209,7 @@ static BOOL verify_boot_sector(struct ntfs_device *dev, ntfs_volume *rawvol) (buf[2]!=0x90)) { check_failed("Boot sector: Bad jump.\n"); } - if (ntfs_boot->oem_id != magicNTFS) { + if (!le64_eq(ntfs_boot->oem_id, magicNTFS)) { check_failed("Boot sector: Bad NTFS magic.\n"); } bytes_per_sector = le16_to_cpu(ntfs_boot->bpb.bytes_per_sector); diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 0bded4e3..e95694b1 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -940,7 +940,7 @@ static void ntfs_fuse_readlink(fuse_req_t req, fuse_ino_t ino) goto exit; } /* Sanity check. */ - if (intx_file->magic != INTX_SYMBOLIC_LINK) { + if (!le64_eq(intx_file->magic, INTX_SYMBOLIC_LINK)) { res = -EINVAL; goto exit; } diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index c0321b9e..90638660 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -972,7 +972,7 @@ static int ntfs_fuse_readlink(const char *org_path, char *buf, size_t buf_size) goto exit; } /* Sanity check. */ - if (intx_file->magic != INTX_SYMBOLIC_LINK) { + if (!le64_eq(intx_file->magic, INTX_SYMBOLIC_LINK)) { res = -EINVAL; goto exit; }