From 1118a56eea659b37d21a160caf236134a9249ddf Mon Sep 17 00:00:00 2001 From: Erik Larsson Date: Thu, 28 Jan 2016 08:28:56 +0100 Subject: [PATCH] Replace all le16 "xor" calculations with le16_xor(...). --- include/ntfs-3g/endians.h | 2 ++ libntfs-3g/reparse.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/ntfs-3g/endians.h b/include/ntfs-3g/endians.h index dd43d96b..91fda48d 100644 --- a/include/ntfs-3g/endians.h +++ b/include/ntfs-3g/endians.h @@ -336,4 +336,6 @@ #define le64_or(a, b) ((a) | (b)) +#define le16_xor(a, b) ((a) ^ (b)) + #endif /* defined _NTFS_ENDIANS_H */ diff --git a/libntfs-3g/reparse.c b/libntfs-3g/reparse.c index 2cea7369..efe71596 100644 --- a/libntfs-3g/reparse.c +++ b/libntfs-3g/reparse.c @@ -358,7 +358,7 @@ static char *search_relative(ntfs_inode *ni, ntfschar *path, int count) } else { pos += lth; if (!morelinks - && !le16_andz(ni->mrec->flags ^ curni->mrec->flags, + && !le16_andz(le16_xor(ni->mrec->flags, curni->mrec->flags), MFT_RECORD_IS_DIRECTORY)) ok = FALSE; if (ntfs_inode_close(curni))