提交 d0b3e4f5 编写于 作者: B Blue Swirl

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: NBlue Swirl <blauwirbel@gmail.com>
上级 38724253
......@@ -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) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册