lcov: annotate the actual "can't happen" lines.
This commit is contained in:
parent
4de4e57a8e
commit
abd5df9ba1
@ -171,8 +171,8 @@ escrypt_r(escrypt_local_t * local, const uint8_t * passwd, size_t passwdlen,
|
||||
|
||||
dst = encode64(dst, buflen - (dst - buf), hash, sizeof(hash));
|
||||
sodium_memzero(hash, sizeof hash);
|
||||
if (!dst || dst >= buf + buflen) { /* Can't happen LCOV_EXCL_LINE */
|
||||
return NULL;
|
||||
if (!dst || dst >= buf + buflen) {
|
||||
return NULL; /* Can't happen LCOV_EXCL_LINE */
|
||||
}
|
||||
*dst = 0; /* NUL termination */
|
||||
|
||||
@ -205,16 +205,16 @@ escrypt_gensalt_r(uint32_t N_log2, uint32_t r, uint32_t p,
|
||||
*dst++ = itoa64[N_log2];
|
||||
|
||||
dst = encode64_uint32(dst, buflen - (dst - buf), r, 30);
|
||||
if (!dst) { /* Can't happen LCOV_EXCL_LINE */
|
||||
return NULL;
|
||||
if (!dst) {
|
||||
return NULL; /* Can't happen LCOV_EXCL_LINE */
|
||||
}
|
||||
dst = encode64_uint32(dst, buflen - (dst - buf), p, 30);
|
||||
if (!dst) { /* Can't happen LCOV_EXCL_LINE */
|
||||
return NULL;
|
||||
if (!dst) {
|
||||
return NULL; /* Can't happen LCOV_EXCL_LINE */
|
||||
}
|
||||
dst = encode64(dst, buflen - (dst - buf), src, srclen);
|
||||
if (!dst || dst >= buf + buflen) { /* Can't happen LCOV_EXCL_LINE */
|
||||
return NULL;
|
||||
if (!dst || dst >= buf + buflen) {
|
||||
return NULL; /* Can't happen LCOV_EXCL_LINE */
|
||||
}
|
||||
*dst = 0; /* NUL termination */
|
||||
|
||||
|
@ -365,9 +365,9 @@ escrypt_kdf_sse(escrypt_local_t * local,
|
||||
}
|
||||
if (local->size < need) {
|
||||
if (free_region(local))
|
||||
return -1;
|
||||
return -1; /* LCOV_EXCL_LINE */
|
||||
if (!alloc_region(local, need))
|
||||
return -1;
|
||||
return -1; /* LCOV_EXCL_LINE */
|
||||
}
|
||||
B = (uint8_t *)local->aligned;
|
||||
V = (uint32_t *)((uint8_t *)B + B_size);
|
||||
|
Loading…
Reference in New Issue
Block a user