aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mach/hurd/mmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/mmap.c')
-rw-r--r--sysdeps/mach/hurd/mmap.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/sysdeps/mach/hurd/mmap.c b/sysdeps/mach/hurd/mmap.c
index 393008f2fe..139f27ad30 100644
--- a/sysdeps/mach/hurd/mmap.c
+++ b/sysdeps/mach/hurd/mmap.c
@@ -48,8 +48,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
&& prot == (PROT_READ|PROT_WRITE)) /* cf VM_PROT_DEFAULT */
{
/* vm_allocate has (a little) less overhead in the kernel too. */
- err = __vm_allocate (__mach_task_self (), &mapaddr, len,
- mapaddr == NULL);
+ err = __vm_allocate (__mach_task_self (), &mapaddr, len, mapaddr == 0);
if (err == KERN_NO_SPACE)
{
@@ -61,7 +60,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
if (!err)
err = __vm_allocate (__mach_task_self (), &mapaddr, len, 0);
}
- else if (mapaddr != NULL)
+ else if (mapaddr != 0)
err = __vm_allocate (__mach_task_self (), &mapaddr, len, 1);
}
@@ -145,7 +144,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
err = __vm_map (__mach_task_self (),
&mapaddr, (vm_size_t) len, (vm_address_t) 0,
- mapaddr == NULL,
+ mapaddr == 0,
memobj, (vm_offset_t) offset,
! (flags & MAP_SHARED),
vmprot, VM_PROT_ALL,
@@ -167,7 +166,7 @@ __mmap (__ptr_t addr, size_t len, int prot, int flags, int fd, off_t offset)
(flags & MAP_SHARED) ? VM_INHERIT_SHARE
: VM_INHERIT_COPY);
}
- else if (mapaddr != NULL)
+ else if (mapaddr != 0)
err = __vm_map (__mach_task_self (),
&mapaddr, (vm_size_t) len, (vm_address_t) 0,
1, memobj, (vm_offset_t) offset,