[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 44/46] qemu-img: Ignore Error objects where the return value suff
From: |
Markus Armbruster |
Subject: |
[PATCH 44/46] qemu-img: Ignore Error objects where the return value suffices |
Date: |
Wed, 24 Jun 2020 18:43:42 +0200 |
Signed-off-by: Markus Armbruster <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 27bf94e7ae..c11bfe0268 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
- Re: [PATCH 26/46] qapi: Smooth another visitor error checking pattern, (continued)
- [PATCH 24/46] qapi: Smooth error checking manually, Markus Armbruster, 2020/06/24
- [PATCH 17/46] qemu-option: Smooth error checking with Coccinelle, Markus Armbruster, 2020/06/24
- [PATCH 15/46] qemu-option: Tidy up opt_set() not to free arguments on failure, Markus Armbruster, 2020/06/24
- [PATCH 39/46] qom: Smooth error checking manually, Markus Armbruster, 2020/06/24
- [PATCH 44/46] qemu-img: Ignore Error objects where the return value suffices,
Markus Armbruster <=
- [PATCH 07/46] error: Avoid more error_propagate() when error is not used here, Markus Armbruster, 2020/06/24
- Re: [PATCH 07/46] error: Avoid more error_propagate() when error is not used here, Vladimir Sementsov-Ogievskiy, 2020/06/26
- [PATCH 40/46] qom: Make functions taking Error ** return bool, not 0/-1, Markus Armbruster, 2020/06/24
- [PATCH 43/46] qdev: Smooth error checking manually, Markus Armbruster, 2020/06/24