block.c: Remove useless 'buf' variable
authorChen Gang <gang.chen.5i5j@gmail.com>
Sat, 21 Jun 2014 13:00:44 +0000 (21:00 +0800)
committerMichael Tokarev <mjt@tls.msk.ru>
Tue, 24 Jun 2014 16:01:24 +0000 (20:01 +0400)
'buf' is not used actually, so remove it and related snprintf() statement.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
block.c

diff --git a/block.c b/block.c
index e6f9b71..217f523 100644 (file)
--- a/block.c
+++ b/block.c
@@ -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);