Patchwork vmdk: remove unneeded variable assignment

login
register
mail settings
Submitter Pavel Borzenkov
Date Oct. 18, 2011, 5:18 p.m.
Message ID <1318958302-14091-1-git-send-email-pavel.borzenkov@gmail.com>
Download mbox | patch
Permalink /patch/120469/
State New
Headers show

Comments

Pavel Borzenkov - Oct. 18, 2011, 5:18 p.m.
Spotted by Clang Analyzer

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
---
 block/vmdk.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Stefan Hajnoczi - Oct. 20, 2011, 5:13 p.m.
On Tue, Oct 18, 2011 at 09:18:22PM +0400, Pavel Borzenkov wrote:
> Spotted by Clang Analyzer
> 
> Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
> ---
>  block/vmdk.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)

Thanks, applied to the trivial patches tree:
http://repo.or.cz/w/qemu/stefanha.git/shortlog/refs/heads/trivial-patches

Stefan

Patch

diff --git a/block/vmdk.c b/block/vmdk.c
index 5d16ec4..3969131 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1387,7 +1387,6 @@  static int vmdk_create(const char *filename, QEMUOptionParameter *options)
             bdrv_delete(bs);
             return -EINVAL;
         }
-        filesize = bdrv_getlength(bs);
         parent_cid = vmdk_read_cid(bs, 0);
         bdrv_delete(bs);
         relative_path(parent_filename, sizeof(parent_filename),