qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] block/rbd: Remove unused local variable


From: Stefan Weil
Subject: Re: [Qemu-devel] [PATCH] block/rbd: Remove unused local variable
Date: Sun, 22 May 2011 14:07:57 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20110307 Iceowl/1.0b1 Icedove/3.0.11

Am 07.05.2011 22:15, schrieb Stefan Weil:
cppcheck report:
rbd.c:246: style: Variable 'snap' is assigned a value that is never used

Remove snap and the related code.

Cc: Christian Brunner<address@hidden>
Cc: Kevin Wolf<address@hidden>
Signed-off-by: Stefan Weil<address@hidden>
---
  block/rbd.c |    4 ----
  1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/block/rbd.c b/block/rbd.c
index 249a590..5c7d44e 100644
--- a/block/rbd.c
+++ b/block/rbd.c
@@ -524,7 +524,6 @@ static int rbd_open(BlockDriverState *bs, const char 
*filename, int flags)
      RbdHeader1 *header;
      char pool[RBD_MAX_SEG_NAME_SIZE];
      char snap_buf[RBD_MAX_SEG_NAME_SIZE];
-    char *snap = NULL;
      char *hbuf = NULL;
      int r;

@@ -533,9 +532,6 @@ static int rbd_open(BlockDriverState *bs, const char 
*filename, int flags)
                        s->name, sizeof(s->name))<  0) {
          return -EINVAL;
      }
-    if (snap_buf[0] != '\0') {
-        snap = snap_buf;
-    }

      if ((r = rados_initialize(0, NULL))<  0) {
          error_report("error initializing");

What about this patch? Can it be applied to the block branch?

Regards,
Stefan W.




reply via email to

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