diff options
author | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-02-02 15:49:44 +0300 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2021-02-12 15:39:44 -0600 |
commit | 934aee14d36e67468260635af61c387227cdaf78 (patch) | |
tree | baa87d2a9264822f6fe7ebcd71f5523ff989a9df /block/commit.c | |
parent | a1e708fcda5eab10c866a7d6a4fad4f80b69ad15 (diff) | |
download | qemu-934aee14d36e67468260635af61c387227cdaf78.zip qemu-934aee14d36e67468260635af61c387227cdaf78.tar.gz qemu-934aee14d36e67468260635af61c387227cdaf78.tar.bz2 |
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/commit.c')
-rw-r--r-- | block/commit.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/block/commit.c b/block/commit.c index 71db7ba..dd9ba87 100644 --- a/block/commit.c +++ b/block/commit.c @@ -254,7 +254,6 @@ void commit_start(const char *job_id, BlockDriverState *bs, BlockDriverState *iter; BlockDriverState *commit_top_bs = NULL; BlockDriverState *filtered_base; - Error *local_err = NULL; int64_t base_size, top_size; uint64_t base_perms, iter_shared_perms; int ret; @@ -312,10 +311,9 @@ void commit_start(const char *job_id, BlockDriverState *bs, commit_top_bs->total_sectors = top->total_sectors; - bdrv_append(commit_top_bs, top, &local_err); - if (local_err) { + ret = bdrv_append(commit_top_bs, top, errp); + if (ret < 0) { commit_top_bs = NULL; - error_propagate(errp, local_err); goto fail; } |