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: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH 02/22] target-i386: cpu_x86_register(): report error from property setter
Date: Thu, 13 Sep 2012 11:40:08 -0300
User-agent: Mutt/1.5.21 (2010-09-15)

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.

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
> 
> 

-- 
Eduardo



reply via email to

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