[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 43/53] qemu-img: Ignore Error objects where the return value suffi
From: |
Markus Armbruster |
Subject: |
[PULL 43/53] qemu-img: Ignore Error objects where the return value suffices |
Date: |
Tue, 7 Jul 2020 23:24:53 +0200 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20200707160613.848843-44-armbru@redhat.com>
---
qemu-img.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index fc405ee171..a6af0eaf80 100644
--- a/qemu-img.c
+++ b/qemu-img.c
@@ -464,22 +464,18 @@ static int add_old_style_options(const char *fmt,
QemuOpts *opts,
const char *base_filename,
const char *base_fmt)
{
- Error *err = NULL;
-
if (base_filename) {
if (!qemu_opt_set(opts, BLOCK_OPT_BACKING_FILE, base_filename,
- &err)) {
+ NULL)) {
error_report("Backing file not supported for file format '%s'",
fmt);
- error_free(err);
return -1;
}
}
if (base_fmt) {
- if (!qemu_opt_set(opts, BLOCK_OPT_BACKING_FMT, base_fmt, &err)) {
+ if (!qemu_opt_set(opts, BLOCK_OPT_BACKING_FMT, base_fmt, NULL)) {
error_report("Backing file format not supported for file "
"format '%s'", fmt);
- error_free(err);
return -1;
}
}
--
2.26.2
- [PULL 30/53] qom: Make functions taking Error ** return bool, not 0/-1, (continued)
- [PULL 30/53] qom: Make functions taking Error ** return bool, not 0/-1, Markus Armbruster, 2020/07/08
- [PULL 46/53] error: New macro ERRP_GUARD(), Markus Armbruster, 2020/07/08
- [PULL 42/53] error: Avoid error_propagate() after migrate_add_blocker(), Markus Armbruster, 2020/07/08
- [PULL 47/53] scripts: Coccinelle script to use ERRP_GUARD(), Markus Armbruster, 2020/07/08
- [PULL 51/53] virtio-9p: Use ERRP_GUARD(), Markus Armbruster, 2020/07/08
- [PULL 13/53] qemu-option: Make functions taking Error ** return bool, not void, Markus Armbruster, 2020/07/08
- [PULL 11/53] qemu-option: Factor out helper opt_create(), Markus Armbruster, 2020/07/08
- [PULL 34/53] error: Eliminate error_propagate() with Coccinelle, part 1, Markus Armbruster, 2020/07/08
- [PULL 36/53] error: Eliminate error_propagate() manually, Markus Armbruster, 2020/07/08
- [PULL 33/53] error: Avoid unnecessary error_propagate() after error_setg(), Markus Armbruster, 2020/07/08
- [PULL 43/53] qemu-img: Ignore Error objects where the return value suffices,
Markus Armbruster <=
- [PULL 31/53] qdev: Make functions taking Error ** return bool, not void, Markus Armbruster, 2020/07/08
- [PULL 23/53] qom: Crash more nicely on object_property_get_link() failure, Markus Armbruster, 2020/07/08
- [PULL 53/53] xen: Use ERRP_GUARD(), Markus Armbruster, 2020/07/08
- [PULL 26/53] qom: Put name parameter before value / visitor parameter, Markus Armbruster, 2020/07/08
- [PULL 40/53] qapi: Smooth visitor error checking in generated code, Markus Armbruster, 2020/07/08
- [PULL 39/53] qapi: Smooth another visitor error checking pattern, Markus Armbruster, 2020/07/08
- [PULL 18/53] qapi: Use returned bool to check for failure, Coccinelle part, Markus Armbruster, 2020/07/08
- [PULL 12/53] qemu-option: Replace opt_set() by cleaner opt_validate(), Markus Armbruster, 2020/07/08
- [PULL 01/53] error: Fix examples in error.h's big comment, Markus Armbruster, 2020/07/08
- [PULL 10/53] qemu-option: Simplify around find_default_by_name(), Markus Armbruster, 2020/07/08