X-Git-Url: https://wimlib.net/git/?p=wimlib;a=blobdiff_plain;f=src%2Fcompress_common.c;h=8b85d9d55d84703ebfa12a99c4240494937bcc29;hp=f74309583a994e263762691c84ea33ec64a0dd7d;hb=80b48ed7aeb8e6c9460ab254920818f9e36d656e;hpb=226a6dfe2909e054568298196785c944a1b5c4fa diff --git a/src/compress_common.c b/src/compress_common.c index f7430958..8b85d9d5 100644 --- a/src/compress_common.c +++ b/src/compress_common.c @@ -14,11 +14,11 @@ # include "config.h" #endif +#include + #include "wimlib/compress_common.h" #include "wimlib/util.h" -#include - /* Given the binary tree node A[subtree_idx] whose children already * satisfy the maxheap property, swap the node with its greater child * until it is greater than both its children, so that the maxheap @@ -125,7 +125,7 @@ sort_symbols(unsigned num_syms, const u32 freqs[restrict], * Tests were done with building the codes for LZX. Results may * vary for different compression algorithms...! */ - num_counters = (DIV_ROUND_UP(num_syms, 4) + 3) & ~3; + num_counters = ALIGN(DIV_ROUND_UP(num_syms, 4), 4); unsigned counters[num_counters];