diff --git a/src/xxd.c b/src/xxd.c index 862dd4a..8493053 100644 --- a/src/xxd.c +++ b/src/xxd.c @@ -250,6 +250,7 @@ exit_with_usage(void) exit(1); } +// LCOV_EXCL_START static void perror_exit(int ret) { @@ -257,6 +258,7 @@ perror_exit(int ret) perror(NULL); exit(ret); } +// LCOV_EXCL_STOP static void error_exit(int ret, char* msg) @@ -272,7 +274,7 @@ fgetc_or_die(FILE* fpi) if(c == EOF && ferror(fpi)) { - perror_exit(2); + perror_exit(2); // LCOV_EXCL_LINE } return c; @@ -283,7 +285,7 @@ fputc_or_die(int c, FILE* fpo) { if(fputc(c, fpo) == EOF) { - perror_exit(3); + perror_exit(3); // LCOV_EXCL_LINE } } @@ -292,7 +294,7 @@ fputs_or_die(const char* s, FILE* fpo) { if(fputs(s, fpo) == EOF) { - perror_exit(3); + perror_exit(3); // LCOV_EXCL_LINE } } @@ -304,12 +306,12 @@ fclose_or_die(FILE* fpi, FILE* fpo) { if(fclose(fpo) != 0) { - perror_exit(3); + perror_exit(3); // LCOV_EXCL_LINE } if(fclose(fpi) != 0) { - perror_exit(2); + perror_exit(2); // LCOV_EXCL_LINE } } @@ -416,7 +418,7 @@ huntype( { if(fflush(fpo) != 0) { - perror_exit(3); + perror_exit(3); // LCOV_EXCL_LINE } #ifdef TRY_SEEK @@ -481,7 +483,7 @@ huntype( if(fflush(fpo) != 0) { - perror_exit(3); + perror_exit(3); // LCOV_EXCL_LINE } #ifdef TRY_SEEK @@ -972,7 +974,7 @@ main(int argc, char* argv[]) { if(fgetc_or_die(fp) == EOF) { - error_exit(4, "Sorry, cannot seek."); + error_exit(4, "Sorry, cannot seek."); // LCOV_EXCL_LINE } } }