From patchwork Thu Jan 22 13:03:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Cody X-Patchwork-Id: 431814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 357081402AC for ; Fri, 23 Jan 2015 00:09:16 +1100 (AEDT) Received: from localhost ([::1]:53237 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEHVa-0000oa-3q for incoming@patchwork.ozlabs.org; Thu, 22 Jan 2015 08:09:14 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44222) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEHQN-0002aP-3c for qemu-devel@nongnu.org; Thu, 22 Jan 2015 08:03:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YEHQG-0000Wy-Lc for qemu-devel@nongnu.org; Thu, 22 Jan 2015 08:03:50 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YEHQG-0000Wt-ES for qemu-devel@nongnu.org; Thu, 22 Jan 2015 08:03:44 -0500 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0MD3gnK017531 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 22 Jan 2015 08:03:43 -0500 Received: from localhost (ovpn-112-98.phx2.redhat.com [10.3.112.98]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t0MD3e5K022240 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO); Thu, 22 Jan 2015 08:03:42 -0500 From: Jeff Cody To: qemu-devel@nongnu.org Date: Thu, 22 Jan 2015 08:03:28 -0500 Message-Id: <3e083881e090200d90af55cea417687b0af86ab4.1421931293.git.jcody@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, jsnow@redhat.com, famz@redhat.com, stefanha@redhat.com Subject: [Qemu-devel] [PATCH v3 4/6] block: remove unused variable in bdrv_commit X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 --- 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) {