Commit 2028a1b2 authored by Anton Altaparmakov's avatar Anton Altaparmakov

NTFS: Fix compiler warnings on big endian machines.

parent 95b30b37
...@@ -198,7 +198,7 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index, ...@@ -198,7 +198,7 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index,
cb - cb_start); cb - cb_start);
/* Have we reached the end of the compression block? */ /* Have we reached the end of the compression block? */
if (cb == cb_end || !le16_to_cpup(cb)) { if (cb == cb_end || !le16_to_cpup((u16*)cb)) {
int i; int i;
ntfs_debug("Completed. Returning success (0)."); ntfs_debug("Completed. Returning success (0).");
...@@ -248,7 +248,8 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index, ...@@ -248,7 +248,8 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index,
/* Setup the current sub-block source pointers and validate range. */ /* Setup the current sub-block source pointers and validate range. */
cb_sb_start = cb; cb_sb_start = cb;
cb_sb_end = cb_sb_start + (le16_to_cpup(cb) & NTFS_SB_SIZE_MASK) + 3; cb_sb_end = cb_sb_start + (le16_to_cpup((u16*)cb) & NTFS_SB_SIZE_MASK)
+ 3;
if (cb_sb_end > cb_end) if (cb_sb_end > cb_end)
goto return_overflow; goto return_overflow;
...@@ -269,7 +270,7 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index, ...@@ -269,7 +270,7 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index,
dp_addr = (u8*)page_address(dp) + do_sb_start; dp_addr = (u8*)page_address(dp) + do_sb_start;
/* Now, we are ready to process the current sub-block (sb). */ /* Now, we are ready to process the current sub-block (sb). */
if (!(le16_to_cpup(cb) & NTFS_SB_IS_COMPRESSED)) { if (!(le16_to_cpup((u16*)cb) & NTFS_SB_IS_COMPRESSED)) {
ntfs_debug("Found uncompressed sub-block."); ntfs_debug("Found uncompressed sub-block.");
/* This sb is not compressed, just copy it into destination. */ /* This sb is not compressed, just copy it into destination. */
...@@ -374,7 +375,7 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index, ...@@ -374,7 +375,7 @@ static int ntfs_decompress(struct page *dest_pages[], int *dest_index,
lg++; lg++;
/* Get the phrase token into i. */ /* Get the phrase token into i. */
pt = le16_to_cpup(cb); pt = le16_to_cpup((u16*)cb);
/* /*
* Calculate starting position of the byte sequence in * Calculate starting position of the byte sequence in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment