mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-11-23 11:35:19 +01:00
replace memset with SetMem because of compiler
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
This commit is contained in:
parent
db08c98366
commit
57e21d5a60
@ -991,7 +991,7 @@ static unsigned HuffmanTree_makeFromFrequencies(HuffmanTree* tree, const unsigne
|
||||
tree->lengths = (unsigned*)lodepng_realloc(tree->lengths, numcodes * sizeof(unsigned));
|
||||
if(!tree->lengths) return 83; /*alloc fail*/
|
||||
/*initialize all lengths to 0*/
|
||||
memset(tree->lengths, 0, numcodes * sizeof(unsigned));
|
||||
SetMem(tree->lengths, 0, numcodes * sizeof(unsigned));
|
||||
|
||||
error = lodepng_huffman_code_lengths(tree->lengths, frequencies, numcodes, maxbitlen);
|
||||
if(!error) error = HuffmanTree_makeFromLengths2(tree);
|
||||
@ -1037,6 +1037,7 @@ static unsigned generateFixedDistanceTree(HuffmanTree* tree)
|
||||
|
||||
/*there are 32 distance codes, but 30-31 are unused*/
|
||||
for(i = 0; i != NUM_DISTANCE_SYMBOLS; ++i) bitlen[i] = 5;
|
||||
|
||||
error = HuffmanTree_makeFromLengths(tree, bitlen, NUM_DISTANCE_SYMBOLS, 15);
|
||||
|
||||
lodepng_free(bitlen);
|
||||
|
Loading…
Reference in New Issue
Block a user