]> Git Repo - qemu.git/commitdiff
exec: Let address_space_unmap() use a boolean 'is_write' argument
authorPhilippe Mathieu-Daudé <[email protected]>
Wed, 19 Feb 2020 19:12:01 +0000 (20:12 +0100)
committerPhilippe Mathieu-Daudé <[email protected]>
Thu, 20 Feb 2020 13:47:08 +0000 (14:47 +0100)
The 'is_write' argument is either 0 or 1.
Convert it to a boolean type.

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
exec.c
include/exec/memory.h

diff --git a/exec.c b/exec.c
index 58664ac7c3feebbebb20494c88acd03642050e16..239239d99d995d425d564accad21607af4cfebf7 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -3598,11 +3598,11 @@ void *address_space_map(AddressSpace *as,
 }
 
 /* Unmaps a memory region previously mapped by address_space_map().
- * Will also mark the memory as dirty if is_write == 1.  access_len gives
+ * Will also mark the memory as dirty if is_write is true.  access_len gives
  * the amount of memory that was actually read or written by the caller.
  */
 void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
-                         int is_write, hwaddr access_len)
+                         bool is_write, hwaddr access_len)
 {
     if (buffer != bounce.buffer) {
         MemoryRegion *mr;
index afee185eae0b8f33135442eb95f6cee9a856ef00..1614d9a02c0cba33c5b6c579ed0ccd700d17dce4 100644 (file)
@@ -2329,7 +2329,7 @@ void *address_space_map(AddressSpace *as, hwaddr addr,
  * @is_write: indicates the transfer direction
  */
 void address_space_unmap(AddressSpace *as, void *buffer, hwaddr len,
-                         int is_write, hwaddr access_len);
+                         bool is_write, hwaddr access_len);
 
 
 /* Internal functions, part of the implementation of address_space_read.  */
This page took 0.036297 seconds and 4 git commands to generate.