qemu-trivial
[Top][All Lists]
Advanced

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

Re: [PATCH] target/ppc/cpu.h: Put macro parameter in parentheses


From: David Gibson
Subject: Re: [PATCH] target/ppc/cpu.h: Put macro parameter in parentheses
Date: Thu, 30 Jan 2020 15:24:13 +1100

On Thu, Jan 30, 2020 at 03:06:18AM +0100, BALATON Zoltan wrote:
> Fix PPC_INPUT macro to work with more complex expressions by
> protecting its argument with parentheses.
> 
> Signed-off-by: BALATON Zoltan <address@hidden>

Pretty unlikely to break anything in practice, but applied nonetheless.

> ---
>  target/ppc/cpu.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/ppc/cpu.h b/target/ppc/cpu.h
> index 8ebeaba649..e3a937e163 100644
> --- a/target/ppc/cpu.h
> +++ b/target/ppc/cpu.h
> @@ -180,7 +180,7 @@ enum {
>      POWERPC_EXCP_TRAP          = 0x40,
>  };
>  
> -#define PPC_INPUT(env) (env->bus_model)
> +#define PPC_INPUT(env) ((env)->bus_model)
>  
>  
> /*****************************************************************************/
>  typedef struct opc_handler_t opc_handler_t;

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

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