diff options
author | Denys Vlasenko | 2010-06-30 19:43:44 +0200 |
---|---|---|
committer | Denys Vlasenko | 2010-06-30 19:43:44 +0200 |
commit | 620e863ba24fe9e0126d1540e89a531264021a77 (patch) | |
tree | c761483f73c045f510690c64a89d6ca56b511a7f /archival/libunarchive/decompress_bunzip2.c | |
parent | fa5ea17b5f6457d888a30afeff87420b7fe0348a (diff) | |
download | busybox-620e863ba24fe9e0126d1540e89a531264021a77.zip busybox-620e863ba24fe9e0126d1540e89a531264021a77.tar.gz |
bzip2 decompression: simple code shrink
function old new delta
unpack_bz2_stream_prime 60 55 -5
get_header_tar 1508 1496 -12
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libunarchive/decompress_bunzip2.c')
-rw-r--r-- | archival/libunarchive/decompress_bunzip2.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/archival/libunarchive/decompress_bunzip2.c b/archival/libunarchive/decompress_bunzip2.c index cd8df08..bdbd39a 100644 --- a/archival/libunarchive/decompress_bunzip2.c +++ b/archival/libunarchive/decompress_bunzip2.c @@ -692,9 +692,9 @@ unpack_bz2_stream(int src_fd, int dst_fd) IF_DESKTOP(long long) int FAST_FUNC unpack_bz2_stream_prime(int src_fd, int dst_fd) { - unsigned char magic[2]; - xread(src_fd, magic, 2); - if (magic[0] != 'B' || magic[1] != 'Z') { + uint16_t magic2; + xread(src_fd, &magic2, 2); + if (magic2 != BZIP2_MAGIC) { bb_error_msg_and_die("invalid magic"); } return unpack_bz2_stream(src_fd, dst_fd); |