mirror of
https://github.com/qemu/qemu.git
synced 2024-11-28 14:24:02 +08:00
linux-user: fix types in a comparison
-1ul is unsigned long, which does not necessarily match abi_ulong type. Fix by using abi_long instead. This also avoids a warning with GCC flag -Wtype-limits. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
3872425343
commit
d0b3e4f5f4
@ -342,7 +342,7 @@ abi_ulong mmap_find_vma(abi_ulong start, abi_ulong size)
|
||||
munmap(ptr, size);
|
||||
|
||||
/* ENOMEM if we checked the whole of the target address space. */
|
||||
if (addr == -1ul) {
|
||||
if (addr == (abi_ulong)-1) {
|
||||
return (abi_ulong)-1;
|
||||
} else if (addr == 0) {
|
||||
if (wrapped) {
|
||||
|
Loading…
Reference in New Issue
Block a user