[Top][All Lists]

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

Re: [Qemu-devel] [PATCH] dirty-bitmap: remove unnecessary return

From: Changlong Xie
Subject: Re: [Qemu-devel] [PATCH] dirty-bitmap: remove unnecessary return
Date: Thu, 30 Jun 2016 16:45:52 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

On 06/30/2016 04:25 PM, Fam Zheng wrote:
On Thu, 06/30 16:01, Changlong Xie wrote:
Otherwise, we could never trigger assert(!bitmap->successor)

Signed-off-by: Changlong Xie <address@hidden>
  block/dirty-bitmap.c | 1 -
  1 file changed, 1 deletion(-)

diff --git a/block/dirty-bitmap.c b/block/dirty-bitmap.c
index 4902ca5..e9df5ac 100644
--- a/block/dirty-bitmap.c
+++ b/block/dirty-bitmap.c
@@ -131,7 +131,6 @@ int bdrv_dirty_bitmap_create_successor(BlockDriverState *bs,
      if (bdrv_dirty_bitmap_frozen(bitmap)) {
          error_setg(errp, "Cannot create a successor for a bitmap that is "
                     "currently frozen");
-        return -1;

This is wrong. Then we will always trigger assert for a frozen bitmap.

IMO, when it's a frozen bitmap, we will always return -1. So "assert(!bitmap->successor)" is useless here, am i right?


reply via email to

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