* [PATCH] target/ppc/cpu.h: Put macro parameter in parentheses
@ 2020-01-30 2:06 BALATON Zoltan
2020-01-30 4:24 ` David Gibson
0 siblings, 1 reply; 2+ messages in thread
From: BALATON Zoltan @ 2020-01-30 2:06 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, David Gibson
Fix PPC_INPUT macro to work with more complex expressions by
protecting its argument with parentheses.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
---
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;
--
2.21.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] target/ppc/cpu.h: Put macro parameter in parentheses
2020-01-30 2:06 [PATCH] target/ppc/cpu.h: Put macro parameter in parentheses BALATON Zoltan
@ 2020-01-30 4:24 ` David Gibson
0 siblings, 0 replies; 2+ messages in thread
From: David Gibson @ 2020-01-30 4:24 UTC (permalink / raw)
To: BALATON Zoltan; +Cc: qemu-trivial, qemu-devel
[-- Attachment #1: Type: text/plain, Size: 1049 bytes --]
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 <balaton@eik.bme.hu>
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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-30 4:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-30 2:06 [PATCH] target/ppc/cpu.h: Put macro parameter in parentheses BALATON Zoltan
2020-01-30 4:24 ` David Gibson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).