From patchwork Mon May 29 15:06:45 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Wolf X-Patchwork-Id: 768244 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 3wc0ff4QwJz9s5L for ; Tue, 30 May 2017 01:15:22 +1000 (AEST) Received: from localhost ([::1]:49152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFMO8-00080N-2G for incoming@patchwork.ozlabs.org; Mon, 29 May 2017 11:15:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45612) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dFMGH-000166-FW for qemu-devel@nongnu.org; Mon, 29 May 2017 11:07:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dFMGG-0006RU-IH for qemu-devel@nongnu.org; Mon, 29 May 2017 11:07:13 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43618) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dFMG9-0006N1-U0; Mon, 29 May 2017 11:07:06 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8F8280C05; Mon, 29 May 2017 15:07:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D8F8280C05 Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx02.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kwolf@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D8F8280C05 Received: from noname.redhat.com (ovpn-117-181.ams2.redhat.com [10.36.117.181]) by smtp.corp.redhat.com (Postfix) with ESMTP id EE4DE7E2C7; Mon, 29 May 2017 15:07:03 +0000 (UTC) From: Kevin Wolf To: qemu-block@nongnu.org Date: Mon, 29 May 2017 17:06:45 +0200 Message-Id: <1496070414-6744-7-git-send-email-kwolf@redhat.com> In-Reply-To: <1496070414-6744-1-git-send-email-kwolf@redhat.com> References: <1496070414-6744-1-git-send-email-kwolf@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Mon, 29 May 2017 15:07:05 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 06/15] qcow2: remove extra local_error variable X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Alberto Garcia Commit d7086422b1c1e75e320519cfe26176db6ec97a37 added a local_err variable global to the qcow2_amend_options() function, so there's no need to have this other one. Signed-off-by: Alberto Garcia Message-id: 20170511150337.21470-1-berto@igalia.com Reviewed-by: Eric Blake Signed-off-by: Max Reitz --- block/qcow2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index a8d61f0..b3ba5da 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -3222,7 +3222,6 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts, if (s->refcount_bits != refcount_bits) { int refcount_order = ctz32(refcount_bits); - Error *local_error = NULL; if (new_version < 3 && refcount_bits != 16) { error_report("Different refcount widths than 16 bits require " @@ -3234,9 +3233,9 @@ static int qcow2_amend_options(BlockDriverState *bs, QemuOpts *opts, helper_cb_info.current_operation = QCOW2_CHANGING_REFCOUNT_ORDER; ret = qcow2_change_refcount_order(bs, refcount_order, &qcow2_amend_helper_cb, - &helper_cb_info, &local_error); + &helper_cb_info, &local_err); if (ret < 0) { - error_report_err(local_error); + error_report_err(local_err); return ret; } }