diff options
Diffstat (limited to 'crypto/hash.c')
-rw-r--r-- | crypto/hash.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/hash.c b/crypto/hash.c index b90af3495a..2907bffd2e 100644 --- a/crypto/hash.c +++ b/crypto/hash.c @@ -36,9 +36,7 @@ static size_t qcrypto_hash_alg_size[QCRYPTO_HASH_ALG__MAX] = { size_t qcrypto_hash_digest_len(QCryptoHashAlgorithm alg) { - if (alg >= G_N_ELEMENTS(qcrypto_hash_alg_size)) { - return 0; - } + assert(alg < G_N_ELEMENTS(qcrypto_hash_alg_size)); return qcrypto_hash_alg_size[alg]; } |