qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report e


From: Igor Mammedov
Subject: Re: [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report error from property setter
Date: Wed, 19 Sep 2012 17:01:19 +0200

On Thu, 13 Sep 2012 11:40:08 -0300
Eduardo Habkost <address@hidden> wrote:

> On Fri, Sep 07, 2012 at 10:54:51PM +0200, Igor Mammedov wrote:
> > Signed-off-by: Igor Mammedov <address@hidden>
> > ---
> >  target-i386/cpu.c | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/target-i386/cpu.c b/target-i386/cpu.c
> > index a89bdc4..3f80069 100644
> > --- a/target-i386/cpu.c
> > +++ b/target-i386/cpu.c
> > @@ -1415,6 +1415,7 @@ int cpu_x86_register(X86CPU *cpu, const char
> > *cpu_model) 
> >  out:
> >      if (error_is_set(&error)) {
> 
> Isn't "if (error_is_set(&error)) better written as "if (error)"?
> 
> There are lots of places where "error_is_set(&error)" is used, but I saw
> other QEMU code using "if (error)" before, so I don't know what's the
> recommended style.
If there aren't any objections, I'll change it to suggested "if (error)"
style, for the next respin.

> 
> Anyway, the point of this patch is to add the error message, not
> cleaning up the existing code. So:
> 
> Reviewed-by: Eduardo Habkost <address@hidden>
> 
> > +        fprintf(stderr, "%s\n", error_get_pretty(error));
> >          error_free(error);
> >          return -1;
> >      }
> > -- 
> > 1.7.11.4
> > 
> > 
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]