From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eRZbB-0001N7-Ie for qemu-devel@nongnu.org; Wed, 20 Dec 2017 03:19:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eRZbA-0002aj-CI for qemu-devel@nongnu.org; Wed, 20 Dec 2017 03:19:33 -0500 Received: from mx1.redhat.com ([209.132.183.28]:39970) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1eRZbA-0002Zr-3X for qemu-devel@nongnu.org; Wed, 20 Dec 2017 03:19:32 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4B11880090 for ; Wed, 20 Dec 2017 08:19:31 +0000 (UTC) From: Markus Armbruster Date: Wed, 20 Dec 2017 09:19:26 +0100 Message-Id: <20171220081927.8761-10-armbru@redhat.com> In-Reply-To: <20171220081927.8761-1-armbru@redhat.com> References: <20171220081927.8761-1-armbru@redhat.com> Subject: [Qemu-devel] [PULL v2 09/10] option: Remove shadowing opt decl from qemu_opt_print() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: "Dr. David Alan Gilbert" From: "Dr. David Alan Gilbert" opt was declared as a separate local inside the last loop, shadowing the local at the top of the function. Signed-off-by: Dr. David Alan Gilbert Message-Id: <20171005190725.18712-1-dgilbert@redhat.com> Reviewed-by: Eric Blake Signed-off-by: Markus Armbruster --- util/qemu-option.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/qemu-option.c b/util/qemu-option.c index 9b1dc8093b..877c5b4d67 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -766,7 +766,7 @@ void qemu_opts_print(QemuOpts *opts, const char *separator) } for (; desc && desc->name; desc++) { const char *value; - QemuOpt *opt = qemu_opt_find(opts, desc->name); + opt = qemu_opt_find(opts, desc->name); value = opt ? opt->str : desc->def_value_str; if (!value) { -- 2.13.6