X-Git-Url: https://jxself.org/git/?p=open-adventure.git;a=blobdiff_plain;f=misc.c;h=b01662f5120f4739cea47623b433c7e15ae58cc2;hp=f05e51883c5e55dbab1a323f73e15cca6149e2b5;hb=94aca03203cbba94c25fba00b7ff80e529d275c7;hpb=1e643da216737e148839f463c10594bbb8ac246b diff --git a/misc.c b/misc.c index f05e518..b01662f 100644 --- a/misc.c +++ b/misc.c @@ -15,8 +15,11 @@ void* xmalloc(size_t size) { void* ptr = malloc(size); if (ptr == NULL) { + // LCOV_EXCL_START + // exclude from coverage analysis because we can't simulate an out of memory error in testing fprintf(stderr, "Out of memory!\n"); exit(EXIT_FAILURE); + // LCOV_EXCL_STOP } return (ptr); }