diff options
author | Denis Vlasenko | 2007-10-14 07:49:48 +0000 |
---|---|---|
committer | Denis Vlasenko | 2007-10-14 07:49:48 +0000 |
commit | 6a9154b6f649341870bc06e896d2fe7235a4aef9 (patch) | |
tree | b80d1603d370838166ada58b42cd6e0b8c7c6970 /archival/bz/huffman.c | |
parent | 3f5fdc7572d932f33f81029956b87230c9b05182 (diff) | |
download | busybox-6a9154b6f649341870bc06e896d2fe7235a4aef9.zip busybox-6a9154b6f649341870bc06e896d2fe7235a4aef9.tar.gz |
bzip2: eliminate some divisions
Diffstat (limited to 'archival/bz/huffman.c')
-rw-r--r-- | archival/bz/huffman.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/archival/bz/huffman.c b/archival/bz/huffman.c index 3f80c99..02838c4 100644 --- a/archival/bz/huffman.c +++ b/archival/bz/huffman.c @@ -183,6 +183,8 @@ void BZ2_hbMakeCodeLengths(uint8_t *len, for (i = 1; i <= alphaSize; i++) { j = weight[i] >> 8; + /* bbox: yes, it is a signed division. + * don't replace with shift! */ j = 1 + (j / 2); weight[i] = j << 8; } |