diff options
author | Rob Landley | 2006-05-29 05:51:12 +0000 |
---|---|---|
committer | Rob Landley | 2006-05-29 05:51:12 +0000 |
commit | bba7f08d2788bc9bc30a7a60fdfd873a73fead9a (patch) | |
tree | d2f6adda7dc120be2aa64c7a984f12c8ecf608f2 /archival | |
parent | 97551974485a8680299560af8863023dfb9634af (diff) | |
download | busybox-bba7f08d2788bc9bc30a7a60fdfd873a73fead9a.zip busybox-bba7f08d2788bc9bc30a7a60fdfd873a73fead9a.tar.gz |
Add SWAP_LE?? and SWAP_BE?? macros, and make things use them. Converts values
to/from little endian or big endian, which is a NOP if that's what the current
platform already is.
Diffstat (limited to 'archival')
-rw-r--r-- | archival/libunarchive/decompress_unlzma.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c index 7ae343f..fa7b37c 100644 --- a/archival/libunarchive/decompress_unlzma.c +++ b/archival/libunarchive/decompress_unlzma.c @@ -121,10 +121,8 @@ int unlzma(int src_fd, int dst_fd) pos_state_mask = (1 << pb) - 1; literal_pos_mask = (1 << lp) - 1; -#if BB_BIG_ENDIAN - header.dict_size = bswap_32(header.dict_size); - header.dst_size = bswap_64(header.dst_size); -#endif + header.dict_size = SWAP_LE32(header.dict_size); + header.dst_size = SWAP_LE64(header.dst_size); if (header.dict_size == 0) header.dict_size = 1; |