--- a/src/buffer.c Sun Dec 29 15:24:20 2024 +0100 +++ b/src/buffer.c Sun Dec 29 16:56:13 2024 +0100 @@ -61,7 +61,7 @@ if (!space) { buffer->bytes = cxMalloc(allocator, capacity); if (buffer->bytes == NULL) { - return -1; + return -1; // LCOV_EXCL_LINE } buffer->flags |= CX_BUFFER_FREE_CONTENTS; } else { @@ -101,8 +101,10 @@ if (0 == cxBufferInit(buf, space, capacity, allocator, flags)) { return buf; } else { + // LCOV_EXCL_START cxFree(allocator, buf); return NULL; + // LCOV_EXCL_STOP } } @@ -190,7 +192,7 @@ buffer->capacity = newcap; return 0; } else { - return -1; + return -1; // LCOV_EXCL_LINE } } @@ -264,7 +266,7 @@ perform_flush = true; } else { if (cxBufferMinimumCapacity(buffer, required)) { - return 0; + return 0; // LCOV_EXCL_LINE } } } else { @@ -452,7 +454,7 @@ if (buffer->capacity < req_capacity) { if (buffer->flags & CX_BUFFER_AUTO_EXTEND) { if (cxBufferMinimumCapacity(buffer, req_capacity)) { - return -1; + return -1; // LCOV_EXCL_LINE } movebytes = buffer->size; } else {