mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 10:34:58 -06:00
accel/tcg: Return bool from page_check_range
Replace the 0/-1 result with true/false. Invert the sense of the test of all callers. Document the function. Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20230707204054.8792-25-richard.henderson@linaro.org>
This commit is contained in:
parent
91e9e116fe
commit
bef6f008b9
9 changed files with 31 additions and 20 deletions
|
@ -182,7 +182,7 @@ static inline bool access_ok_untagged(int type, abi_ulong addr, abi_ulong size)
|
|||
: !guest_range_valid_untagged(addr, size)) {
|
||||
return false;
|
||||
}
|
||||
return page_check_range((target_ulong)addr, size, type) == 0;
|
||||
return page_check_range((target_ulong)addr, size, type);
|
||||
}
|
||||
|
||||
static inline bool access_ok(CPUState *cpu, int type,
|
||||
|
|
|
@ -8122,7 +8122,7 @@ static int open_self_maps_1(CPUArchState *cpu_env, int fd, bool smaps)
|
|||
max = h2g_valid(max - 1) ?
|
||||
max : (uintptr_t) g2h_untagged(GUEST_ADDR_MAX) + 1;
|
||||
|
||||
if (page_check_range(h2g(min), max - min, flags) == -1) {
|
||||
if (!page_check_range(h2g(min), max - min, flags)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue