Branch Coverage

src/dsdiff.c
Criterion Covered Total %
branch 31 82 37.8


line true false branch
44 0 0 while (ck_offset < size) {
52 0 0 if ( !_check_buf(dsdiff->infile, dsdiff->buf, 12, DSDIFF_BLOCK_SIZE) ) return ERROR_CK;
61 0 0 if ( !strcmp(chunk_id, "DIAR") ) {
62 0 0 if ( !_check_buf(dsdiff->infile, dsdiff->buf, chunk_size, DSDIFF_BLOCK_SIZE) ) return ERROR_CK;
67 0 0 } else if ( !strcmp(chunk_id, "DITI") ) {
68 0 0 if ( !_check_buf(dsdiff->infile, dsdiff->buf, chunk_size, DSDIFF_BLOCK_SIZE) ) return ERROR_CK;
86 0 2 if ( !_check_buf(dsdiff->infile, dsdiff->buf, 4, DSDIFF_BLOCK_SIZE) ) return ERROR_CK;
87 0 2 if ( strncmp( (char *)buffer_ptr(dsdiff->buf), "SND ", 4 ) ) return 0;
90 6 2 while (ck_offset < size) {
97 0 6 if ( !_check_buf(dsdiff->infile, dsdiff->buf, 16, DSDIFF_BLOCK_SIZE) ) return ERROR_CK;
106 2 4 if ( !strcmp(chunk_id, "FS ") ) {
108 2 2 } else if ( !strcmp(chunk_id, "CHNL") ) {
110 0 2 } else if ( !strcmp(chunk_id, "ID3 ") ) {
116 2 0 if (dsdiff->channel_num == 0 || dsdiff->sampling_frequency == 0) return ERROR_CK;
0 2 if (dsdiff->channel_num == 0 || dsdiff->sampling_frequency == 0) return ERROR_CK;
151 0 2 if ( !_check_buf(infile, &buf, 16, DSDIFF_BLOCK_SIZE) ) {
156 2 0 if ( !strncmp( (char *)buffer_ptr(&buf), "FRM8", 4 ) ) {
161 0 2 if (strncmp( (char *)buffer_ptr(&buf), "DSD ", 4 ) ) {
170 8 2 while (dsdiff.offset <= total_size - 12) {
177 0 8 if ( !_check_buf(infile, &buf, 12, DSDIFF_BLOCK_SIZE) ) {
191 2 6 if (!strcmp(chunk_id, "PROP")) {
193 0 6 } else if (!strcmp(chunk_id, "DIIN")) {
195 2 4 } else if (!strcmp(chunk_id, "DSD ")) {
199 0 4 } else if ( !strcmp(chunk_id, "ID3 ") ) {
203 0 8 if ( flags & ERROR_CK ) {
214 2 0 if ((flags & DSD_CK) == 0 || (flags & PROP_CK) == 0) {
0 2 if ((flags & DSD_CK) == 0 || (flags & PROP_CK) == 0) {
236 0 2 if (dsdiff.tag_diar_artist) {
241 0 2 if (dsdiff.tag_diti_title) {
248 0 2 if (dsdiff.metadata_offset) {
251 0 0 if ( !_check_buf(infile, &buf, 10, DSDIFF_BLOCK_SIZE) ) {
256 0 0 if (
257 0 0 (bptr[0] == 'I' && bptr[1] == 'D' && bptr[2] == '3') &&
0 0 (bptr[0] == 'I' && bptr[1] == 'D' && bptr[2] == '3') &&
0 0 (bptr[0] == 'I' && bptr[1] == 'D' && bptr[2] == '3') &&
258 0 0 bptr[3] < 0xff && bptr[4] < 0xff &&
0 0 bptr[3] < 0xff && bptr[4] < 0xff &&
259 0 0 bptr[6] < 0x80 && bptr[7] < 0x80 && bptr[8] < 0x80 && bptr[9] < 0x80
0 0 bptr[6] < 0x80 && bptr[7] < 0x80 && bptr[8] < 0x80 && bptr[9] < 0x80
0 0 bptr[6] < 0x80 && bptr[7] < 0x80 && bptr[8] < 0x80 && bptr[9] < 0x80
273 0 2 if (err) return err;