aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-05-03 12:18:50 -0400
committerNick Mathewson <nickm@torproject.org>2016-05-16 08:25:59 -0400
commit5b91e70a4f0020e7ea70a134f62a28f4633a8085 (patch)
tree9334d56658c1072651389eb3b0e1a36bcf3a9c8c
parent8a536be70511e78befa08475a109a231cde0cd0e (diff)
downloadtor-5b91e70a4f0020e7ea70a134f62a28f4633a8085.tar.gz
tor-5b91e70a4f0020e7ea70a134f62a28f4633a8085.zip
Mark unreachable lines in crypto_ed25519.c
-rw-r--r--src/common/crypto_ed25519.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/common/crypto_ed25519.c b/src/common/crypto_ed25519.c
index ea2d8e3892..654611553e 100644
--- a/src/common/crypto_ed25519.c
+++ b/src/common/crypto_ed25519.c
@@ -94,8 +94,8 @@ static const ed25519_impl_t *ed25519_impl = NULL;
static inline const ed25519_impl_t *
get_ed_impl(void)
{
- if (PREDICT_UNLIKELY(ed25519_impl == NULL)) {
- pick_ed25519_impl();
+ if (BUG(ed25519_impl == NULL)) {
+ pick_ed25519_impl(); // LCOV_EXCL_LINE - We always call ed25519_init().
}
return ed25519_impl;
}
@@ -594,9 +594,12 @@ pick_ed25519_impl(void)
if (ed25519_impl_spot_check() == 0)
return;
+ /* LCOV_EXCL_START
+ * unreachable unless ed25519_donna is broken */
log_warn(LD_CRYPTO, "The Ed25519-donna implementation seems broken; using "
"the ref10 implementation.");
ed25519_impl = &impl_ref10;
+ /* LCOV_EXCL_STOP */
}
/* Initialize the Ed25519 implementation. This is neccessary if you're