target/ppc/cpu.h: Put macro parameter in parentheses
PATCH 1/1 target/ppc/cpu.h: Put macro parameter in parentheses
Fix PPC_INPUT macro to work with more complex expressions by protecting its argument with parentheses.
Signed-off-by BALATON Zoltan <[email protected]>
--- target/ppc/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/ppc/cpu.h +1 -1
@@ -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 ;
Signature · 1 line
2.21.1
Quoted 4 lines · BALATON Zoltan
Fix
PPC_INPUTmacro to work with more complex expressions by protecting its argument with parentheses.Signed-off-by BALATON Zoltan <[email protected]>
Pretty unlikely to break anything in practice, but applied nonetheless.
Quoted 17 lines
--- target/ppc/cpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/ppc/cpu.h +1
-1@@ -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 ;
Signature · 4 lines
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