From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41039) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEiqS-0002XH-2m for qemu-devel@nongnu.org; Fri, 23 Jan 2015 13:20:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEiqR-0000sN-CC for qemu-devel@nongnu.org; Fri, 23 Jan 2015 13:20:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39183) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEiqR-0000sF-5l for qemu-devel@nongnu.org; Fri, 23 Jan 2015 13:20:35 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0NIKXTu032266 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 23 Jan 2015 13:20:34 -0500 From: Kevin Wolf Date: Fri, 23 Jan 2015 19:20:14 +0100 Message-Id: <1422037218-31855-9-git-send-email-kwolf@redhat.com> In-Reply-To: <1422037218-31855-1-git-send-email-kwolf@redhat.com> References: <1422037218-31855-1-git-send-email-kwolf@redhat.com> Subject: [Qemu-devel] [PULL 08/12] block: remove unused variable in bdrv_commit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com From: Jeff Cody As Stefan pointed out, the variable 'filename' in bdrv_commit is unused, despite being maintained in previous patches. With this patch, get rid of the variable for good. Signed-off-by: Jeff Cody Signed-off-by: Kevin Wolf --- block.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/block.c b/block.c index cbe4a32..d45e4dd 100644 --- a/block.c +++ b/block.c @@ -2207,7 +2207,6 @@ int bdrv_commit(BlockDriverState *bs) int n, ro, open_flags; int ret = 0; uint8_t *buf = NULL; - char filename[PATH_MAX]; if (!drv) return -ENOMEDIUM; @@ -2222,8 +2221,6 @@ int bdrv_commit(BlockDriverState *bs) } ro = bs->backing_hd->read_only; - /* Use pstrcpy (not strncpy): filename must be NUL-terminated. */ - pstrcpy(filename, sizeof(filename), bs->backing_hd->filename); open_flags = bs->backing_hd->open_flags; if (ro) { -- 1.8.3.1