diff --git a/block.c b/block.c index 8800a6b5b37215f8c264676dce5857e2d206a8b4..c9629a44b99c8adf0de3c58e879c73118e8559f8 100644 --- a/block.c +++ b/block.c @@ -4040,7 +4040,7 @@ int coroutine_fn bdrv_is_allocated(BlockDriverState *bs, int64_t sector_num, if (ret < 0) { return ret; } - return (ret & BDRV_BLOCK_ALLOCATED); + return !!(ret & BDRV_BLOCK_ALLOCATED); } /*