qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH trivial] block.c: Remove useless 'buf' variable


From: Chen Gang
Subject: [Qemu-devel] [PATCH trivial] block.c: Remove useless 'buf' variable
Date: Sat, 21 Jun 2014 21:00:44 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7

'buf' is not used actually, so remove it and related snprintf() statement.


Signed-off-by: Chen Gang <address@hidden>
---
 block.c | 2 --
 dtc     | 1 -
 2 files changed, 3 deletions(-)
 delete mode 160000 dtc

diff --git a/block.c b/block.c
index 43abe96..74af8d7 100644
--- a/block.c
+++ b/block.c
@@ -5595,7 +5595,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 */
@@ -5616,7 +5615,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);
diff --git a/dtc b/dtc
deleted file mode 160000
index bc895d6..0000000
--- a/dtc
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit bc895d6d09695d05ceb8b52486ffe861d6cfbdde
-- 
1.7.11.7



reply via email to

[Prev in Thread] Current Thread [Next in Thread]