From: Alexey Krasikov Date: Wed, 15 Apr 2020 20:13:35 +0000 (+0300) Subject: crypto/secret: fix inconsequential errors. X-Git-Tag: qemu-xen-4.15.0~201^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=861c50bf5db3c18f5cd74ea929d4e018fdcedc64;p=qemu-xen.git crypto/secret: fix inconsequential errors. Change condition from QCRYPTO_SECRET_FORMAT_RAW to QCRYPTO_SECRET_FORMAT_BASE64 in if-operator, because this is potential error if you add another format value. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alexey Krasikov Signed-off-by: Daniel P. Berrangé --- diff --git a/crypto/secret.c b/crypto/secret.c index 5fb6bbe59c..a846a3c87c 100644 --- a/crypto/secret.c +++ b/crypto/secret.c @@ -204,7 +204,7 @@ qcrypto_secret_prop_set_loaded(Object *obj, input = output; inputlen = outputlen; } else { - if (secret->format != QCRYPTO_SECRET_FORMAT_RAW) { + if (secret->format == QCRYPTO_SECRET_FORMAT_BASE64) { qcrypto_secret_decode(input, inputlen, &output, &outputlen, &local_err); g_free(input);