Branch Coverage

src/pdfmake_color_mgmt.c
Criterion Covered Total %
branch 24 96 25.0


line true false branch
49 0 0 if (!cs) return NULL;
54 0 0 if (bp) memcpy(cs->black_point, bp, 3 * sizeof(double));
64 0 7 if (!cs) return NULL;
69 0 7 if (bp) memcpy(cs->black_point, bp, 3 * sizeof(double));
80 0 0 if (!cs) return NULL;
85 0 0 if (bp) memcpy(cs->black_point, bp, 3 * sizeof(double));
96 0 0 if (!data || len == 0) return NULL;
0 0 if (!data || len == 0) return NULL;
99 0 0 if (!cs) return NULL;
103 0 0 if (!cs->icc_data) { free(cs); return NULL; }
121 0 0 if (!fp) return NULL;
124 0 0 if (len < 0) { fclose(fp); return NULL; }
127 0 0 if (!buf) { fclose(fp); return NULL; }
158 0 6 if (!cs) return NULL;
178 0 0 if (!cs) return NULL;
184 0 0 if (!cs->palette) { free(cs); return NULL; }
196 7 0 if (!cs || !doc) return 0;
0 7 if (!cs || !doc) return 0;
197 0 7 if (cs->obj_num) return cs->obj_num;
216 0 0 for (i = 0; i < 3; i++)
239 12 4 for (i = 0; i < 3; i++) {
243 36 4 for (i = 0; i < 9; i++)
266 0 0 for (i = 0; i < 3; i++)
268 0 0 for (i = 0; i < 4; i++)
290 0 0 if (cs->icc_alt[0]) {
337 12 3 for (i = 0; i < 4; i++) {
357 0 0 if (cs->base) {
397 0 0 if (!doc || !condition) return PDFMAKE_EINVAL;
0 0 if (!doc || !condition) return PDFMAKE_EINVAL;
399 0 0 if (!doc->finalized || doc->root_num == 0) return PDFMAKE_EINVAL;
0 0 if (!doc->finalized || doc->root_num == 0) return PDFMAKE_EINVAL;
417 0 0 if (info) {
425 0 0 if (dest_profile && dest_profile->family == PDFMAKE_CS_ICC_BASED) {
0 0 if (dest_profile && dest_profile->family == PDFMAKE_CS_ICC_BASED) {
427 0 0 if (profile_num > 0) {
435 0 0 if (!catalog || catalog->kind != PDFMAKE_DICT) return PDFMAKE_EINVAL;
0 0 if (!catalog || catalog->kind != PDFMAKE_DICT) return PDFMAKE_EINVAL;
450 0 3 if (k_val >= 1.0) {
474 0 5 if (!hex) return -1;
475 4 1 if (*hex == '#') hex++;
477 0 5 if (len == 3) {
478 0 0 if (sscanf(hex, "%1x%1x%1x", &rv, &gv, &bv) != 3) return -1;
482 4 1 } else if (len == 6) {
483 0 4 if (sscanf(hex, "%2x%2x%2x", &rv, &gv, &bv) != 3) return -1;
496 0 13 if (!cs) return;
498 13 0 if (cs == &_cs_gray || cs == &_cs_rgb || cs == &_cs_cmyk) return;
13 0 if (cs == &_cs_gray || cs == &_cs_rgb || cs == &_cs_cmyk) return;
0 13 if (cs == &_cs_gray || cs == &_cs_rgb || cs == &_cs_cmyk) return;