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

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

View File

@ -302,4 +302,6 @@
#define le64_eq(a, b) ((a) == (b))
#define sle16_eq(a, b) ((a) == (b))
#endif /* defined _NTFS_ENDIANS_H */

View File

@ -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;
}