On 6/24/20 11:43 AM, Markus Armbruster wrote:
See recent commit "error: Document Error API usage rules" for
rationale.

Signed-off-by: Markus Armbruster <arm...@redhat.com>
---
  include/qemu/option.h | 16 ++++----
  blockdev.c            |  5 ++-
  util/qemu-option.c    | 92 +++++++++++++++++++++++++------------------
  3 files changed, 64 insertions(+), 49 deletions(-)


-static void qemu_opts_from_qdict_entry(QemuOpts *opts,
+static bool qemu_opts_from_qdict_entry(QemuOpts *opts,
                                         const QDictEntry *entry,
                                         Error **errp)
  {
      const char *key = qdict_entry_key(entry);
      QObject *obj = qdict_entry_value(entry);
-    char buf[32], *tmp = NULL;
+    char buf[32];
+    g_autofree char *tmp = NULL;

A bit fancier than a straight mechanical conversion here, but it works.

Reviewed-by: Eric Blake <ebl...@redhat.com>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to