[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 42/44] qemu-img: Ignore Error objects where the return value s
From: |
Markus Armbruster |
Subject: |
[PATCH v3 42/44] qemu-img: Ignore Error objects where the return value suffices |
Date: |
Mon, 6 Jul 2020 10:09:48 +0200 |
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@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
- [PATCH v3 44/44] hmp: Ignore Error objects where the return value suffices, (continued)
- [PATCH v3 44/44] hmp: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/06
- [PATCH v3 32/44] error: Avoid unnecessary error_propagate() after error_setg(), Markus Armbruster, 2020/07/06
- [PATCH v3 28/44] qom: Use returned bool to check for failure, manual part, Markus Armbruster, 2020/07/06
- [PATCH v3 35/44] error: Eliminate error_propagate() manually, Markus Armbruster, 2020/07/06
- [PATCH v3 25/44] qom: Put name parameter before value / visitor parameter, Markus Armbruster, 2020/07/06
- Re: [PATCH v3 00/44] Less clumsy error checking, Markus Armbruster, 2020/07/06
- [PATCH v3 43/44] qdev: Ignore Error objects where the return value suffices, Markus Armbruster, 2020/07/06
- [PATCH v3 42/44] qemu-img: Ignore Error objects where the return value suffices,
Markus Armbruster <=
- [PATCH v3 37/44] block/parallels: Simplify parallels_open() after previous commit, Markus Armbruster, 2020/07/06
- [PATCH v3 33/44] error: Eliminate error_propagate() with Coccinelle, part 1, Markus Armbruster, 2020/07/06