aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorAndrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>2023-02-02 21:15:23 +0300
committerKevin Wolf <kwolf@redhat.com>2023-02-17 14:34:24 +0100
commita4d5224c2cb650b5a401d626d3f36e42e6987aa7 (patch)
tree2b91e19bb2998cc35b9ea03fe64eabb18ffe8b16 /util
parent005ee3cdc79e05b7691c8ce078c147c1f9336814 (diff)
downloadqemu-a4d5224c2cb650b5a401d626d3f36e42e6987aa7.zip
qemu-a4d5224c2cb650b5a401d626d3f36e42e6987aa7.tar.gz
qemu-a4d5224c2cb650b5a401d626d3f36e42e6987aa7.tar.bz2
hbitmap: fix hbitmap_status() return value for first dirty bit case
The last return statement should return true, as we already evaluated that start == next_dirty Also, fix hbitmap_status() description in header Cc: qemu-stable@nongnu.org Fixes: a6426475a75 ("block/dirty-bitmap: introduce bdrv_dirty_bitmap_status()") Signed-off-by: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com> Message-Id: <20230202181523.423131-1-andrey.zhadchenko@virtuozzo.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'util')
-rw-r--r--util/hbitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/hbitmap.c b/util/hbitmap.c
index 297db35..6d6e1b5 100644
--- a/util/hbitmap.c
+++ b/util/hbitmap.c
@@ -331,7 +331,7 @@ bool hbitmap_status(const HBitmap *hb, int64_t start, int64_t count,
assert(next_zero > start);
*pnum = next_zero - start;
- return false;
+ return true;
}
bool hbitmap_empty(const HBitmap *hb)