]> Git Repo - qemu.git/blobdiff - crypto/hash-nettle.c
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.8-20161028' into staging
[qemu.git] / crypto / hash-nettle.c
index 4c6f50b65d8d33ffafaece63a9cf515e8ef725d0..6a206dcb18c9ae2523881bf4a9df1d58838de9bd 100644 (file)
@@ -113,8 +113,7 @@ int qcrypto_hash_bytesv(QCryptoHashAlgorithm alg,
     int i;
     union qcrypto_hash_ctx ctx;
 
-    if (alg >= G_N_ELEMENTS(qcrypto_hash_alg_map) ||
-        qcrypto_hash_alg_map[alg].init == NULL) {
+    if (!qcrypto_hash_supports(alg)) {
         error_setg(errp,
                    "Unknown hash algorithm %d",
                    alg);
This page took 0.02377 seconds and 4 git commands to generate.