提交 78fb328e 编写于 作者: M Max Reitz 提交者: Kevin Wolf

qcow2: Use sizeof(**refcount_table)

When implementing variable refcounts, we want to be able to easily find
all the places in qemu which are tied to a certain refcount order.
Replace sizeof(uint16_t) in the check code by sizeof(**refcount_table)
so we can later find it more easily.
Signed-off-by: NMax Reitz <mreitz@redhat.com>
Reviewed-by: NEric Blake <eblake@redhat.com>
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 6ca56bf5
......@@ -1647,7 +1647,7 @@ static int check_refblocks(BlockDriverState *bs, BdrvCheckResult *res,
*nb_clusters);
memset(&(*refcount_table)[old_nb_clusters], 0,
(*nb_clusters - old_nb_clusters) *
sizeof(uint16_t));
sizeof(**refcount_table));
}
(*refcount_table)[cluster]--;
inc_refcounts(bs, res, *refcount_table, *nb_clusters,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册