Am 2017-07-18 08:09, schrieb Philippe Mathieu-Daudé:
> Applied using the Coccinelle semantic patch
> scripts/coccinelle/use_osdep.cocci
>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
QEMU_IS_ALIGNED() sounds like it is used to check if a memory access is
aligned. Although it does the same, the line in question is used for
formatted output. I'm not sure if this macro should be used here.
-michael
> ---
> target/lm32/translate.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/lm32/translate.c b/target/lm32/translate.c
> index 692882f447..a9b159a6e3 100644
> --- a/target/lm32/translate.c
> +++ b/target/lm32/translate.c
> @@ -1185,7 +1185,7 @@ void lm32_cpu_dump_state(CPUState *cs, FILE *f,
> fprintf_function cpu_fprintf,
>
> for (i = 0; i < 32; i++) {
> cpu_fprintf(f, "r%2.2d=%8.8x ", i, env->regs[i]);
> - if ((i + 1) % 4 == 0) {
> + if (QEMU_IS_ALIGNED(i + 1, 4)) {
> cpu_fprintf(f, "\n");
> }
> }