Exclude a few lines from lcov coverage stats:
- "fail" branches in selftests
- "should never happen" errors in SSL
- cipher_xxx() failures in SSL
- some things that fail only if malloc() fails
- some things that fail only if fread/fwrite()/ftell() fails
(after fopen() succeeded)
- some things that fail only if a parameter is invalid, but the parameter was
actually validated earlier
- generated code in library/error.c
diff --git a/library/x509_csr.c b/library/x509_csr.c
index dbf659b..bdc51a9 100644
--- a/library/x509_csr.c
+++ b/library/x509_csr.c
@@ -115,7 +115,7 @@
p = mbedtls_calloc( 1, len = buflen );
if( p == NULL )
- return( MBEDTLS_ERR_X509_ALLOC_FAILED );
+ return( MBEDTLS_ERR_X509_ALLOC_FAILED ); // LCOV_EXCL_LINE
memcpy( p, buf, buflen );