aboutsummaryrefslogtreecommitdiff
path: root/archival
diff options
context:
space:
mode:
authorlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-29 05:51:12 +0000
committerlandley <landley@69ca8d6d-28ef-0310-b511-8ec308f3f277>2006-05-29 05:51:12 +0000
commit2684187601d4f087e36d2810fc8f67ca0daf9989 (patch)
treed2f6adda7dc120be2aa64c7a984f12c8ecf608f2 /archival
parentec890bc1e05269be205cc1218bae5e090d150a2f (diff)
downloadbusybox-w32-2684187601d4f087e36d2810fc8f67ca0daf9989.tar.gz
busybox-w32-2684187601d4f087e36d2810fc8f67ca0daf9989.tar.bz2
busybox-w32-2684187601d4f087e36d2810fc8f67ca0daf9989.zip
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. git-svn-id: svn://busybox.net/trunk/busybox@15215 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'archival')
-rw-r--r--archival/libunarchive/decompress_unlzma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/archival/libunarchive/decompress_unlzma.c b/archival/libunarchive/decompress_unlzma.c
index 7ae343f0f..fa7b37c37 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)
121 pos_state_mask = (1 << pb) - 1; 121 pos_state_mask = (1 << pb) - 1;
122 literal_pos_mask = (1 << lp) - 1; 122 literal_pos_mask = (1 << lp) - 1;
123 123
124#if BB_BIG_ENDIAN 124 header.dict_size = SWAP_LE32(header.dict_size);
125 header.dict_size = bswap_32(header.dict_size); 125 header.dst_size = SWAP_LE64(header.dst_size);
126 header.dst_size = bswap_64(header.dst_size);
127#endif
128 126
129 if (header.dict_size == 0) 127 if (header.dict_size == 0)
130 header.dict_size = 1; 128 header.dict_size = 1;