diff options
author | Markus Armbruster <armbru@redhat.com> | 2022-11-21 09:50:51 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2022-12-14 16:19:35 +0100 |
commit | 0a3090b1d2e3f62578b2f982b11fc5f0185b1de2 (patch) | |
tree | 533ca1d9aaff9b5f751d5078b0989bb6c340a1e4 /util/qemu-config.c | |
parent | f766e6dc6acfcfc7e2885518954b1e88111b5527 (diff) | |
download | qemu-0a3090b1d2e3f62578b2f982b11fc5f0185b1de2.zip qemu-0a3090b1d2e3f62578b2f982b11fc5f0185b1de2.tar.gz qemu-0a3090b1d2e3f62578b2f982b11fc5f0185b1de2.tar.bz2 |
qemu-config: Use ERRP_GUARD() where obviously appropriate
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20221121085054.683122-8-armbru@redhat.com>
Diffstat (limited to 'util/qemu-config.c')
-rw-r--r-- | util/qemu-config.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/util/qemu-config.c b/util/qemu-config.c index e983607..8c907fa 100644 --- a/util/qemu-config.c +++ b/util/qemu-config.c @@ -318,9 +318,9 @@ void qemu_add_opts(QemuOptsList *list) static int qemu_config_foreach(FILE *fp, QEMUConfigCB *cb, void *opaque, const char *fname, Error **errp) { + ERRP_GUARD(); char line[1024], prev_group[64], group[64], arg[64], value[1024]; Location loc; - Error *local_err = NULL; QDict *qdict = NULL; int res = -EINVAL, lno = 0; int count = 0; @@ -348,10 +348,9 @@ static int qemu_config_foreach(FILE *fp, QEMUConfigCB *cb, void *opaque, } if (qdict != prev) { if (prev) { - cb(prev_group, prev, opaque, &local_err); + cb(prev_group, prev, opaque, errp); qobject_unref(prev); - if (local_err) { - error_propagate(errp, local_err); + if (*errp) { goto out; } } |