aboutsummaryrefslogtreecommitdiff
path: root/elf/dl-minimal-malloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'elf/dl-minimal-malloc.c')
-rw-r--r--elf/dl-minimal-malloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/elf/dl-minimal-malloc.c b/elf/dl-minimal-malloc.c
index 25d8707..b4bd162 100644
--- a/elf/dl-minimal-malloc.c
+++ b/elf/dl-minimal-malloc.c
@@ -1,6 +1,6 @@
/* Minimal malloc implementation for dynamic linker and static
initialization.
- Copyright (C) 1995-2024 Free Software Foundation, Inc.
+ Copyright (C) 1995-2025 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -34,7 +34,7 @@ static void *alloc_ptr, *alloc_end, *alloc_last_block;
void *
__minimal_malloc (size_t n)
{
- if (alloc_end == 0)
+ if (alloc_end == NULL)
{
/* Consume any unused space in the last page of our data segment. */
extern int _end attribute_hidden;
@@ -57,7 +57,7 @@ __minimal_malloc (size_t n)
if (__glibc_unlikely (nup == 0 && n != 0))
return NULL;
nup += GLRO(dl_pagesize);
- page = __mmap (0, nup, PROT_READ|PROT_WRITE,
+ page = __mmap (NULL, nup, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, -1, 0);
if (page == MAP_FAILED)
return NULL;