Branch Coverage

deps/libgit2/deps/zlib/inftrees.c
Criterion Covered Total %
branch 46 76 60.5


line true false branch
107 20112 1257 for (len = 0; len <= MAXBITS; len++)
109 129480 1257 for (sym = 0; sym < codes; sym++)
114 13659 0 for (max = MAXBITS; max >= 1; max--)
115 1257 12402 if (count[max] != 0) break;
116 1257 0 if (root > max) root = max;
117 0 1257 if (max == 0) { /* no symbols to code at all */
126 3336 28 for (min = 1; min < max; min++)
127 1229 2107 if (count[min] != 0) break;
128 0 1257 if (root < min) root = min;
132 18855 1257 for (len = 1; len <= MAXBITS; len++) {
135 0 18855 if (left < 0) return -1; /* over-subscribed */
137 0 1257 if (left > 0 && (type == CODES || max != 1))
0 0 if (left > 0 && (type == CODES || max != 1))
0 0 if (left > 0 && (type == CODES || max != 1))
142 17598 1257 for (len = 1; len < MAXBITS; len++)
146 129480 1257 for (sym = 0; sym < codes; sym++)
147 26363 103117 if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
209 419 838 if ((type == LENS && used > ENOUGH_LENS) ||
419 0 if ((type == LENS && used > ENOUGH_LENS) ||
419 838 if ((type == LENS && used > ENOUGH_LENS) ||
210 0 419 (type == DISTS && used > ENOUGH_DISTS))
217 21713 4650 if (work[sym] + 1U < match) {
221 4231 419 else if (work[sym] >= match) {
237 59069 26363 } while (fill != 0);
241 25106 26363 while (huff & incr)
243 25106 1257 if (incr != 0) {
252 4344 22019 if (--(count[len]) == 0) {
253 1257 3087 if (len == max) break;
258 0 25106 if (len > root && (huff & mask) != low) {
0 0 if (len > root && (huff & mask) != low) {
260 0 0 if (drop == 0)
269 0 0 while (curr + drop < max) {
271 0 0 if (left <= 0) break;
278 0 0 if ((type == LENS && used > ENOUGH_LENS) ||
0 0 if ((type == LENS && used > ENOUGH_LENS) ||
0 0 if ((type == LENS && used > ENOUGH_LENS) ||
279 0 0 (type == DISTS && used > ENOUGH_DISTS))
293 0 1257 if (huff != 0) {