Branch Coverage

deps/libgit2/src/util/hash/sha1dc/sha1.c
Criterion Covered Total %
branch 24 40 60.0


line true false branch
1727 4414 0 if (ctx->detect_coll)
1729 4414 0 if (ctx->ubc_check)
1734 257 4157 if (ubc_dv_mask[0] != 0)
1736 8224 257 for (i = 0; sha1_dvs[i].dvType != 0; ++i)
1738 266 7958 if (ubc_dv_mask[0] & ((uint32_t)(1) << sha1_dvs[i].maskb))
1740 21280 266 for (j = 0; j < 80; ++j)
1746 266 0 if ((0 == ((ihvtmp[0] ^ ctx->ihv[0]) | (ihvtmp[1] ^ ctx->ihv[1]) | (ihvtmp[2] ^ ctx->ihv[2]) | (ihvtmp[3] ^ ctx->ihv[3]) | (ihvtmp[4] ^ ctx->ihv[4])))
1747 0 266 || (ctx->reduced_round_coll && 0==((ctx->ihv1[0] ^ ctx->ihv2[0]) | (ctx->ihv1[1] ^ ctx->ihv2[1]) | (ctx->ihv1[2] ^ ctx->ihv2[2]) | (ctx->ihv1[3] ^ ctx->ihv2[3]) | (ctx->ihv1[4] ^ ctx->ihv2[4]))))
0 0 || (ctx->reduced_round_coll && 0==((ctx->ihv1[0] ^ ctx->ihv2[0]) | (ctx->ihv1[1] ^ ctx->ihv2[1]) | (ctx->ihv1[2] ^ ctx->ihv2[2]) | (ctx->ihv1[3] ^ ctx->ihv2[3]) | (ctx->ihv1[4] ^ ctx->ihv2[4]))))
1751 0 0 if (ctx->safe_hash)
1783 0 0 if (safehash)
1792 0 0 if (ubc_check)
1800 0 0 if (detect_coll)
1808 0 0 if (reduced_round_coll)
1823 79 4486 if (len == 0)
1829 2914 1572 if (left && len >= fill)
844 2070 if (left && len >= fill)
1838 2051 4486 while (len >= 64)
1851 4483 3 if (len > 0)
1869 1353 166 uint32_t padn = (last < 56) ? (56 - last) : (120 - last);