From 7cf7f0a31cb30273a81e380df05a820603c01b55 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Tue, 16 Sep 2014 10:43:38 -0700 Subject: [PATCH] More lcov exclusions. poly1305 optimized implementations will come after 1.0. --- .../crypto_onetimeauth/poly1305/onetimeauth_poly1305.c | 2 ++ .../randombytes/salsa20/randombytes_salsa20_random.c | 6 +++--- src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c | 6 +++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c b/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c index 3eb28e5f..14253b7b 100644 --- a/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c +++ b/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c @@ -2,6 +2,7 @@ #include "crypto_onetimeauth_poly1305.h" #include "donna/poly1305_donna.h" +/* LCOV_EXCL_START */ static const crypto_onetimeauth_poly1305_implementation *implementation = &crypto_onetimeauth_poly1305_donna_implementation; @@ -18,6 +19,7 @@ crypto_onetimeauth_poly1305_implementation_name(void) { return implementation->implementation_name(); } +/* LCOV_EXCL_STOP */ int crypto_onetimeauth_poly1305(unsigned char *out, const unsigned char *in, diff --git a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c index 1435d07e..869ae8f1 100644 --- a/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c +++ b/src/libsodium/randombytes/salsa20/randombytes_salsa20_random.c @@ -93,12 +93,12 @@ safe_read(const int fd, void * const buf_, size_t count) assert(count > (size_t) 0U); do { while ((readnb = read(fd, buf, count)) < (ssize_t) 0 && - errno == EINTR); + errno == EINTR); /* LCOV_EXCL_LINE */ if (readnb < (ssize_t) 0) { - return readnb; + return readnb; /* LCOV_EXCL_LINE */ } if (readnb == (ssize_t) 0) { - break; + break; /* LCOV_EXCL_LINE */ } count -= (size_t) readnb; buf += readnb; diff --git a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c index 4f864b5b..711c711c 100644 --- a/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c +++ b/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c @@ -83,12 +83,12 @@ safe_read(const int fd, void * const buf_, size_t count) assert(count > (size_t) 0U); do { while ((readnb = read(fd, buf, count)) < (ssize_t) 0 && - errno == EINTR); + errno == EINTR); /* LCOV_EXCL_LINE */ if (readnb < (ssize_t) 0) { - return readnb; + return readnb; /* LCOV_EXCL_LINE */ } if (readnb == (ssize_t) 0) { - break; + break; /* LCOV_EXCL_LINE */ } count -= (size_t) readnb; buf += readnb;