aboutsummaryrefslogtreecommitdiff
path: root/src/common/crypto_s2k.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-09-28 09:25:17 -0400
committerNick Mathewson <nickm@torproject.org>2017-09-28 09:25:17 -0400
commita64d79ca4c5699be161a54d94e0e6c0f7d06db7c (patch)
tree5d0fa776b824fe9bd30014e92259c7d0805b3e34 /src/common/crypto_s2k.c
parent9727a9248a474909c0ad53be9d55cd39b69d0611 (diff)
downloadtor-a64d79ca4c5699be161a54d94e0e6c0f7d06db7c.tar.gz
tor-a64d79ca4c5699be161a54d94e0e6c0f7d06db7c.zip
Move around some LCOV_EXCLs in src/common
Apparently, my compiler now generates coverage markers for label-only lines, so we need to exclude those too if they are meant to be unreachable.
Diffstat (limited to 'src/common/crypto_s2k.c')
-rw-r--r--src/common/crypto_s2k.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/common/crypto_s2k.c b/src/common/crypto_s2k.c
index 4db6762ef7..b2fcca54c4 100644
--- a/src/common/crypto_s2k.c
+++ b/src/common/crypto_s2k.c
@@ -86,9 +86,11 @@ secret_to_key_key_len(uint8_t type)
return DIGEST_LEN;
case S2K_TYPE_SCRYPT:
return DIGEST256_LEN;
+ // LCOV_EXCL_START
default:
- tor_fragile_assert(); // LCOV_EXCL_LINE
- return -1; // LCOV_EXCL_LINE
+ tor_fragile_assert();
+ return -1;
+ // LCOV_EXCL_STOP
}
}
@@ -169,9 +171,11 @@ make_specifier(uint8_t *spec_out, uint8_t type, unsigned flags)
/* r = 8; p = 2. */
spec_out[SCRYPT_SPEC_LEN-1] = (3u << 4) | (1u << 0);
break;
+ // LCOV_EXCL_START - we should have returned above.
default:
- tor_fragile_assert(); // LCOV_EXCL_LINE - we should have returned above.
+ tor_fragile_assert();
return S2K_BAD_ALGORITHM;
+ // LCOV_EXCL_STOP
}
return speclen;