You need to sign in or sign up before continuing.
提交 5db97df2 编写于 作者: C Chen Gang 提交者: Michael Tokarev

block.c: Remove useless 'buf' variable

'buf' is not used actually, so remove it and related snprintf() statement.
Signed-off-by: NChen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: NKevin Wolf <kwolf@redhat.com>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 18b1afa8
......@@ -5581,7 +5581,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
if (backing_file) {
BlockDriverState *bs;
uint64_t size;
char buf[32];
int back_flags;
/* backing files always opened read-only */
......@@ -5602,7 +5601,6 @@ void bdrv_img_create(const char *filename, const char *fmt,
bdrv_get_geometry(bs, &size);
size *= 512;
snprintf(buf, sizeof(buf), "%" PRId64, size);
qemu_opt_set_number(opts, BLOCK_OPT_SIZE, size);
bdrv_unref(bs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册