Branch Coverage

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


line true false branch
15 0 27314 if ((ret = malloc(sizeof(*ret))) == NULL) {
28 20252 7062 len = count? seplen * (count - 1): 0;
30 37392 27314 for (i=0; i
33 0 37392 if ((item = b_stack_item_at(items, i)) == NULL) {
40 0 27314 if ((ret->str = malloc(len + 1)) == NULL) {
49 37392 27314 for (i=0; i
53 0 37392 if ((item = b_stack_item_at(items, i)) == NULL) {
59 37392 0 if (seplen > 0 && i) {
17140 20252 if (seplen > 0 && i) {
60 0 17140 if (memcpy(ret->str + off, sep, seplen) == NULL) {
67 30820 6572 if (itemlen > 0) {
68 0 30820 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) {