Branch Coverage

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


line true false branch
107 19824 1239 for (len = 0; len <= MAXBITS; len++)
109 127620 1239 for (sym = 0; sym < codes; sym++)
114 13594 0 for (max = MAXBITS; max >= 1; max--)
115 1239 12355 if (count[max] != 0) break;
116 1239 0 if (root > max) root = max;
117 0 1239 if (max == 0) { /* no symbols to code at all */
126 3272 48 for (min = 1; min < max; min++)
127 1191 2081 if (count[min] != 0) break;
128 0 1239 if (root < min) root = min;
132 18585 1239 for (len = 1; len <= MAXBITS; len++) {
135 0 18585 if (left < 0) return -1; /* over-subscribed */
137 0 1239 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 17346 1239 for (len = 1; len < MAXBITS; len++)
146 127620 1239 for (sym = 0; sym < codes; sym++)
147 25852 101768 if (lens[sym] != 0) work[offs[lens[sym]]++] = (unsigned short)sym;
209 413 826 if ((type == LENS && used > ENOUGH_LENS) ||
413 0 if ((type == LENS && used > ENOUGH_LENS) ||
413 826 if ((type == LENS && used > ENOUGH_LENS) ||
210 0 413 (type == DISTS && used > ENOUGH_DISTS))
217 21328 4524 if (work[sym] + 1U < match) {
221 4111 413 else if (work[sym] >= match) {
237 51932 25852 } while (fill != 0);
241 24613 25852 while (huff & incr)
243 24613 1239 if (incr != 0) {
252 4149 21703 if (--(count[len]) == 0) {
253 1239 2910 if (len == max) break;
258 0 24613 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 1239 if (huff != 0) {