diff options
author | Alexey Krasikov <alex-krasikov@yandex-team.ru> | 2020-04-15 23:13:35 +0300 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2020-05-07 12:48:41 +0100 |
commit | 861c50bf5db3c18f5cd74ea929d4e018fdcedc64 (patch) | |
tree | d5255d5edb7fee43a18c5209b5cc9286dcbafbbd /crypto | |
parent | 569644f761f704901b70bd259762c60b7cb28634 (diff) | |
download | qemu-861c50bf5db3c18f5cd74ea929d4e018fdcedc64.zip qemu-861c50bf5db3c18f5cd74ea929d4e018fdcedc64.tar.gz qemu-861c50bf5db3c18f5cd74ea929d4e018fdcedc64.tar.bz2 |
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é <philmd@redhat.com>
Signed-off-by: Alexey Krasikov <alex-krasikov@yandex-team.ru>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/secret.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/secret.c b/crypto/secret.c index 5fb6bbe..a846a3c 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); |