OSDN Git Service
(root)
/
android-x86
/
external-ntfs-3g.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec18534
)
ntfsck.c: Fix comparing le32 values as u32.
author
Erik Larsson
<mechie@users.sourceforge.net>
Wed, 27 Jan 2016 14:23:13 +0000
(15:23 +0100)
committer
Erik Larsson
<mechie@users.sourceforge.net>
Wed, 27 Jan 2016 14:23:13 +0000
(15:23 +0100)
This is harmless except when we do strict endianness checking, in which
case this results in a compile error. Fixed by converting values to
CPU endianness before comparing them.
ntfsprogs/ntfsck.c
patch
|
blob
|
history
diff --git
a/ntfsprogs/ntfsck.c
b/ntfsprogs/ntfsck.c
index
c1087c7
..
d49f3f9
100644
(file)
--- a/
ntfsprogs/ntfsck.c
+++ b/
ntfsprogs/ntfsck.c
@@
-584,7
+584,7
@@
static BOOL check_file_record(u8 *buffer, u16 buflen)
ATTR_REC *attr_rec;
// check record magic
- assert_u32_equal(
mft_rec->magic, magic_FILE
, "FILE record magic");
+ assert_u32_equal(
le32_to_cpu(mft_rec->magic), le32_to_cpu(magic_FILE)
, "FILE record magic");
// todo: records 16-23 must be filled in order.
// todo: what to do with magic_BAAD?