qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v1 26/59] block/replication.c: remove unneeded label in replicati


From: Daniel Henrique Barboza
Subject: [PATCH v1 26/59] block/replication.c: remove unneeded label in replication_co_writev
Date: Mon, 6 Jan 2020 15:23:52 -0300

The label 'out' in replication_co_writev() can be replaced by
'return ret'. The other label, 'out1', was renamed to 'out'
since the original 'out' label was removed.

CC: Wen Congyang <address@hidden>
CC: Xie Changlong <address@hidden>
Signed-off-by: Daniel Henrique Barboza <address@hidden>
---
 block/replication.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/block/replication.c b/block/replication.c
index 99532ce521..3d5eb64d41 100644
--- a/block/replication.c
+++ b/block/replication.c
@@ -258,7 +258,7 @@ static coroutine_fn int 
replication_co_writev(BlockDriverState *bs,
     assert(!flags);
     ret = replication_get_io_status(s);
     if (ret < 0) {
-        goto out;
+        return ret;
     }
 
     if (ret == 0) {
@@ -280,7 +280,7 @@ static coroutine_fn int 
replication_co_writev(BlockDriverState *bs,
                                       remaining_sectors * BDRV_SECTOR_SIZE,
                                       &count);
         if (ret < 0) {
-            goto out1;
+            goto out;
         }
 
         assert(QEMU_IS_ALIGNED(count, BDRV_SECTOR_SIZE));
@@ -292,7 +292,7 @@ static coroutine_fn int 
replication_co_writev(BlockDriverState *bs,
         ret = bdrv_co_pwritev(target, sector_num * BDRV_SECTOR_SIZE,
                               n * BDRV_SECTOR_SIZE, &hd_qiov, 0);
         if (ret < 0) {
-            goto out1;
+            goto out;
         }
 
         remaining_sectors -= n;
@@ -300,9 +300,8 @@ static coroutine_fn int 
replication_co_writev(BlockDriverState *bs,
         bytes_done += count;
     }
 
-out1:
-    qemu_iovec_destroy(&hd_qiov);
 out:
+    qemu_iovec_destroy(&hd_qiov);
     return ret;
 }
 
-- 
2.24.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]