]> www.infradead.org Git - users/dwmw2/qemu.git/commitdiff
qobject: Catch another straggler for use of qdict_put_str()
authorEric Blake <eblake@redhat.com>
Sat, 24 Jun 2017 18:10:07 +0000 (12:10 -0600)
committerMarkus Armbruster <armbru@redhat.com>
Wed, 12 Jul 2017 15:51:54 +0000 (17:51 +0200)
Dan's addition of key-secret improvements in commit 29cf9336 was
developed prior to the addition of QDict scalar insertion macros,
but merged after the general cleanup in commit 46f5ac20.
Patch created mechanically by rerunning:
  spatch --sp-file scripts/coccinelle/qobject.cocci \
         --macro-file scripts/cocci-macro-file.h --dir . --in-place

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Message-Id: <20170624181008.25497-2-eblake@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
qemu-img.c

index f7ffb79db6fcdc363fd5530fbf9c59d002c35357..02900ce1d1175d212c14cb9c0258bf5f40357e5f 100644 (file)
@@ -355,7 +355,7 @@ static int img_add_key_secrets(void *opaque,
     QDict *options = opaque;
 
     if (g_str_has_suffix(name, "key-secret")) {
-        qdict_put(options, name, qstring_from_str(value));
+        qdict_put_str(options, name, value);
     }
 
     return 0;