mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
Let address_space_rw() calls pass a boolean 'is_write' argument
Since its introduction in commit ac1970fbe8, address_space_rw()
takes a boolean 'is_write' argument. Fix the codebase by using
an explicit boolean type.
This commit was produced with the included Coccinelle script
scripts/coccinelle/exec_rw_const.
Inspired-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
@@ -9,6 +9,18 @@
|
||||
--dir .
|
||||
*/
|
||||
|
||||
// Convert to boolean
|
||||
@@
|
||||
expression E1, E2, E3, E4, E5;
|
||||
@@
|
||||
(
|
||||
- address_space_rw(E1, E2, E3, E4, E5, 0)
|
||||
+ address_space_rw(E1, E2, E3, E4, E5, false)
|
||||
|
|
||||
- address_space_rw(E1, E2, E3, E4, E5, 1)
|
||||
+ address_space_rw(E1, E2, E3, E4, E5, true)
|
||||
)
|
||||
|
||||
// Use address_space_write instead of casting to non-const
|
||||
@@
|
||||
type T;
|
||||
|
||||
Reference in New Issue
Block a user