summaryrefslogtreecommitdiff
path: root/archival/libarchive
diff options
context:
space:
mode:
authorDenys Vlasenko2014-02-28 15:05:43 +0100
committerDenys Vlasenko2014-02-28 15:05:43 +0100
commit2108a6f0b56633fba1e70af406da147c02b11765 (patch)
treec2d34059968635e65242f9fa39a1db7823679bf9 /archival/libarchive
parente2318bbad786d6f9ebff704490246bfe52e588c0 (diff)
downloadbusybox-2108a6f0b56633fba1e70af406da147c02b11765.zip
busybox-2108a6f0b56633fba1e70af406da147c02b11765.tar.gz
unlzma: move some variables in "more local" scope
No code changes as verified by objdump Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
-rw-r--r--archival/libarchive/decompress_unlzma.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/archival/libarchive/decompress_unlzma.c b/archival/libarchive/decompress_unlzma.c
index ca32bd8..a89b846 100644
--- a/archival/libarchive/decompress_unlzma.c
+++ b/archival/libarchive/decompress_unlzma.c
@@ -214,8 +214,6 @@ unpack_lzma_stream(transformer_aux_data_t *aux UNUSED_PARAM, int src_fd, int dst
uint32_t pos_state_mask;
uint32_t literal_pos_mask;
uint16_t *p;
- int num_bits;
- int num_probs;
rc_t *rc;
int i;
uint8_t *buffer;
@@ -247,11 +245,15 @@ unpack_lzma_stream(transformer_aux_data_t *aux UNUSED_PARAM, int src_fd, int dst
buffer = xmalloc(MIN(header.dst_size, header.dict_size));
- num_probs = LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp));
- p = xmalloc(num_probs * sizeof(*p));
- num_probs += LZMA_LITERAL - LZMA_BASE_SIZE;
- for (i = 0; i < num_probs; i++)
- p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1;
+ {
+ int num_probs;
+
+ num_probs = LZMA_BASE_SIZE + (LZMA_LIT_SIZE << (lc + lp));
+ p = xmalloc(num_probs * sizeof(*p));
+ num_probs += LZMA_LITERAL - LZMA_BASE_SIZE;
+ for (i = 0; i < num_probs; i++)
+ p[i] = (1 << RC_MODEL_TOTAL_BITS) >> 1;
+ }
rc = rc_init(src_fd); /*, RC_BUFFER_SIZE); */
@@ -310,6 +312,7 @@ unpack_lzma_stream(transformer_aux_data_t *aux UNUSED_PARAM, int src_fd, int dst
goto one_byte2;
#endif
} else {
+ int num_bits;
int offset;
uint16_t *prob2;
#define prob_len prob2