diff options
| author | Michael Forney <mforney@mforney.org> | 2017-12-27 21:08:13 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2017-12-27 21:10:12 -0800 |
| commit | 12bc4d583bdfcbbd0fa3be2162e780ead43af035 (patch) | |
| tree | 6955a59c8de03a7b366de55beaf98f5ba8c86f8f /pkg/pigz/patch/0002-Restructure-loop-to-prevent-warning.patch | |
| parent | 05df55d2703ff4997f3f52eb3f6d03e35d243788 (diff) | |
pigz: Update to 2.4
Diffstat (limited to 'pkg/pigz/patch/0002-Restructure-loop-to-prevent-warning.patch')
| -rw-r--r-- | pkg/pigz/patch/0002-Restructure-loop-to-prevent-warning.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pkg/pigz/patch/0002-Restructure-loop-to-prevent-warning.patch b/pkg/pigz/patch/0002-Restructure-loop-to-prevent-warning.patch new file mode 100644 index 00000000..7b3d35fd --- /dev/null +++ b/pkg/pigz/patch/0002-Restructure-loop-to-prevent-warning.patch @@ -0,0 +1,44 @@ +From 758851fab26523b69e92f2973c636647614406c2 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Wed, 27 Dec 2017 21:07:16 -0800 +Subject: [PATCH] Restructure loop to prevent warning + +--- + zopfli/src/zopfli/deflate.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/zopfli/src/zopfli/deflate.c b/zopfli/src/zopfli/deflate.c +index 4b0724b..f3d7745 100644 +--- a/zopfli/src/zopfli/deflate.c ++++ b/zopfli/src/zopfli/deflate.c +@@ -378,22 +378,22 @@ Change the population counts in a way that the consequent Hufmann tree + compression, especially its rle-part will be more likely to compress this data + more efficiently. length containts the size of the histogram. + */ +-void OptimizeHuffmanForRle(int length, size_t* counts) { ++static void OptimizeHuffmanForRle(int length, size_t* counts) { + int i, k, stride; + size_t symbol, sum, limit; + int* good_for_rle; + + /* 1) We don't want to touch the trailing zeros. We may break the + rules of the format by adding more data in the distance codes. */ +- for (; length >= 0; --length) { +- if (length == 0) { +- return; +- } ++ for (; length > 0; --length) { + if (counts[length - 1] != 0) { + /* Now counts[0..length - 1] does not have trailing zeros. */ + break; + } + } ++ if (length == 0) { ++ return; ++ } + /* 2) Let's mark all population counts that already can be encoded + with an rle code.*/ + good_for_rle = (int*)malloc(length * sizeof(int)); +-- +2.15.1 + |
