Showing 1 of 4 files from the diff.
Other files ignored by Codecov
tst/main.c has changed.
include/hf.h has changed.

@@ -296,18 +296,22 @@
Loading
296 296
        *size_p = (size_t)file_size;
297 297
    }
298 298
299 -
    buf_p = malloc((size_t)file_size);
299 +
    if (file_size > 0) {
300 +
        buf_p = malloc((size_t)file_size);
300 301
301 -
    if (buf_p == NULL) {
302 -
        goto out1;
303 -
    }
302 +
        if (buf_p == NULL) {
303 +
            goto out1;
304 +
        }
304 305
305 -
    if (fseek(file_p, 0, SEEK_SET) != 0) {
306 -
        goto out2;
307 -
    }
306 +
        if (fseek(file_p, 0, SEEK_SET) != 0) {
307 +
            goto out2;
308 +
        }
308 309
309 -
    if (fread(buf_p, (size_t)file_size, 1, file_p) != 1) {
310 -
        goto out2;
310 +
        if (fread(buf_p, (size_t)file_size, 1, file_p) != 1) {
311 +
            goto out2;
312 +
        }
313 +
    } else {
314 +
        buf_p = malloc(1);
311 315
    }
312 316
313 317
    fclose(file_p);
Files Coverage
src/hf.c 79.09%
Project Totals (1 files) 79.09%
20.1
3.7=.7
TRAVIS_OS_NAME=linux
1
ignore:
2
  - "tst/.*"
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading