Branch Coverage

src/b_util.c
Criterion Covered Total %
branch 17 30 56.6


line true false branch
15 0 26514 if ((ret = malloc(sizeof(*ret))) == NULL) {
28 19851 6663 len = count? seplen * (count - 1): 0;
30 36190 26514 for (i=0; i
33 0 36190 if ((item = b_stack_item_at(items, i)) == NULL) {
40 0 26514 if ((ret->str = malloc(len + 1)) == NULL) {
49 36190 26514 for (i=0; i
53 0 36190 if ((item = b_stack_item_at(items, i)) == NULL) {
59 36190 0 if (seplen > 0 && i) {
16339 19851 if (seplen > 0 && i) {
60 0 16339 if (memcpy(ret->str + off, sep, seplen) == NULL) {
67 29620 6570 if (itemlen > 0) {
68 0 29620 if (memcpy(ret->str + off, item->str, itemlen) == NULL) {
100 0 0 if ((buf = malloc(st->st_size + 1)) == NULL) {
104 0 0 if (readlink(path->str, buf, st->st_size) < 0) {
110 0 0 if ((ret = malloc(sizeof(*ret))) == NULL) {