summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive/archive_read.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-02 14:48:48 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-02 14:48:48 (GMT)
commite9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b (patch)
tree7e84ef0666764bcad5e77c9955c7dcd13413b427 /Utilities/cmlibarchive/libarchive/archive_read.c
parentdb9c40b4f5c9e1aadfe11c89040bad1e3b386162 (diff)
parent501345e470bb9c5b0cb61aff84bd50ffdd95b92d (diff)
downloadCMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.zip
CMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.tar.gz
CMake-e9bc469b2abcd0ad4cb3ad4bfefbc5ef1f559c1b.tar.bz2
Merge branch 'upstream-LibArchive' into update-libarchive
Resolve conflicts in C code by taking their side. Resolve conflicts in CMake code by integrating the changes.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_read.c')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_read.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_read.c b/Utilities/cmlibarchive/libarchive/archive_read.c
index 033ed8b..0bbacc8 100644
--- a/Utilities/cmlibarchive/libarchive/archive_read.c
+++ b/Utilities/cmlibarchive/libarchive/archive_read.c
@@ -547,16 +547,20 @@ archive_read_open1(struct archive *_a)
* it wants to handle this stream. Repeat until we've finished
* building the pipeline.
*/
+
+/* We won't build a filter pipeline with more stages than this. */
+#define MAX_NUMBER_FILTERS 25
+
static int
choose_filters(struct archive_read *a)
{
- int number_bidders, i, bid, best_bid, n;
+ int number_bidders, i, bid, best_bid, number_filters;
struct archive_read_filter_bidder *bidder, *best_bidder;
struct archive_read_filter *filter;
ssize_t avail;
int r;
- for (n = 0; n < 25; ++n) {
+ for (number_filters = 0; number_filters < MAX_NUMBER_FILTERS; ++number_filters) {
number_bidders = sizeof(a->bidders) / sizeof(a->bidders[0]);
best_bid = 0;