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

Reply via email to