aboutsummaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>2021-02-02 15:49:44 +0300
committerEric Blake <eblake@redhat.com>2021-02-12 15:39:44 -0600
commit934aee14d36e67468260635af61c387227cdaf78 (patch)
treebaa87d2a9264822f6fe7ebcd71f5523ff989a9df /block.c
parenta1e708fcda5eab10c866a7d6a4fad4f80b69ad15 (diff)
block: use return status of bdrv_append()
Now bdrv_append returns status and we can drop all the local_err things around it. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Alberto Garcia <berto@igalia.com> Message-Id: <20210202124956.63146-3-vsementsov@virtuozzo.com> Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block.c b/block.c
index fdb0261cb3..c682c3e3b9 100644
--- a/block.c
+++ b/block.c
@@ -3118,7 +3118,6 @@ static BlockDriverState *bdrv_append_temp_snapshot(BlockDriverState *bs,
int64_t total_size;
QemuOpts *opts = NULL;
BlockDriverState *bs_snapshot = NULL;
- Error *local_err = NULL;
int ret;
/* if snapshot, we create a temporary backing file and open it
@@ -3165,9 +3164,8 @@ static BlockDriverState *bdrv_append_temp_snapshot(BlockDriverState *bs,
* order to be able to return one, we have to increase
* bs_snapshot's refcount here */
bdrv_ref(bs_snapshot);
- bdrv_append(bs_snapshot, bs, &local_err);
- if (local_err) {
- error_propagate(errp, local_err);
+ ret = bdrv_append(bs_snapshot, bs, errp);
+ if (ret < 0) {
bs_snapshot = NULL;
goto out;
}