Received: from eggs.gnu.org ([2001:4830:134:3::10]:43864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB5ya-00029w-Fo for qemu-devel@nongnu.org; Thu, 09 Jun 2016 15:50:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB5yY-0000q2-9g for qemu-devel@nongnu.org; Thu, 09 Jun 2016 15:50:47 -0400 Date: Thu, 9 Jun 2016 16:50:36 -0300 From: Eduardo Habkost Message-ID: <20160609195036.GX18662@thinpad.lan.raisama.net> References: <1465492263-28472-1-git-send-email-imammedo@redhat.com> <1465492263-28472-2-git-send-email-imammedo@redhat.com> <20160609172900.GV18662@thinpad.lan.raisama.net> <5759C5F6.4020405@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5759C5F6.4020405@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 1/6] target-i386: cpu: consolidate calls of object_property_parse() in x86_cpu_parse_featurestr List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: Igor Mammedov , peter.maydell@linaro.org, mark.cave-ayland@ilande.co.uk, qemu-devel@nongnu.org, blauwirbel@gmail.com, qemu-arm@nongnu.org, pbonzini@redhat.com, rth@twiddle.net On Thu, Jun 09, 2016 at 01:39:34PM -0600, Eric Blake wrote: > On 06/09/2016 11:29 AM, Eduardo Habkost wrote: > > On Thu, Jun 09, 2016 at 07:10:58PM +0200, Igor Mammedov wrote: > > [...] > >> + > >> + if (local_err) { > >> + error_propagate(errp, local_err); > >> } > > > > error_propagate() already ignores local_err==NULL so you don't > > need to check it first. > > In fact, if the ONLY reason you are doing an 'if (local_err)' > conditional is to decide if an error was set, then you don't care about > the error locally, and could have passed errp instead of &local_err in > the first place. In this case, we stop the parsing loop if an error is detected. -- Eduardo