From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57219) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWBnm-0000IQ-Km for qemu-devel@nongnu.org; Mon, 13 Jun 2011 14:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QWBnl-00034o-I8 for qemu-devel@nongnu.org; Mon, 13 Jun 2011 14:23:54 -0400 Received: from mail.hq.newdream.net ([66.33.206.127]:56349) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QWBnl-00034a-7y for qemu-devel@nongnu.org; Mon, 13 Jun 2011 14:23:53 -0400 Message-ID: <4DF6518D.4060403@dreamhost.com> Date: Mon, 13 Jun 2011 11:06:05 -0700 From: Josh Durgin MIME-Version: 1.0 References: <1307736330-13457-1-git-send-email-weil@mail.berlios.de> In-Reply-To: <1307736330-13457-1-git-send-email-weil@mail.berlios.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2] block/rbd: Remove unused local variable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Kevin Wolf , QEMU Developers , Christian Brunner On 06/10/2011 01:05 PM, Stefan Weil wrote: > Variable 'snap' is assigned a value that is never used. > Remove snap and the related code. > > v2: > The unused variable which was in function rbd_open is now in function > qemu_rbd_create, so the patch needed an update. > > Cc: Christian Brunner > Cc: Josh Durgin > Cc: Kevin Wolf > Signed-off-by: Stefan Weil > --- > block/rbd.c | 4 ---- > 1 files changed, 0 insertions(+), 4 deletions(-) > > diff --git a/block/rbd.c b/block/rbd.c > index bdc448a..d5659cd 100644 > --- a/block/rbd.c > +++ b/block/rbd.c > @@ -227,7 +227,6 @@ static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options) > char name[RBD_MAX_IMAGE_NAME_SIZE]; > char snap_buf[RBD_MAX_SNAP_NAME_SIZE]; > char conf[RBD_MAX_CONF_SIZE]; > - char *snap = NULL; > rados_t cluster; > rados_ioctx_t io_ctx; > int ret; > @@ -238,9 +237,6 @@ static int qemu_rbd_create(const char *filename, QEMUOptionParameter *options) > conf, sizeof(conf))< 0) { > return -EINVAL; > } > - if (snap_buf[0] != '\0') { > - snap = snap_buf; > - } > > /* Read out options */ > while (options&& options->name) { Looks good to me: Reviewed-by: Josh Durgin