From 75bfdfc7df6d3557358fe7f1c01e748ef6b5efc7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 13 Mar 2002 23:27:20 +0000 Subject: Update. 2002-03-13 Wolfram Gloger * malloc/malloc.c (sYSMALLOc): Don't change brk if mmap failed. 2002-03-02 Andreas Schwab * stdio-common/vfprintf.c (process_arg): Fix decimal format with 'h' flag and positional arg. * stdio-common/tst-printf.c (rfg3): New function to test positional arguments. (main): Fix some warnings. 2002-03-13 Jakub Jelinek * elf/dl-minimal.c (_itoa): Use _itoa_lower_digits_internal if SHARED. * elf/dl-reloc.c (_dl_reloc_bad_type): Likewise. --- malloc/malloc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'malloc') diff --git a/malloc/malloc.c b/malloc/malloc.c index 7414c705a9..059508a95e 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -2824,11 +2824,12 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av; /* Don't try if size wraps around 0 */ if ((unsigned long)(size) > (unsigned long)(nb)) { - brk = (char*)(MMAP(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE)); + char *mbrk = (char*)(MMAP(0, size, PROT_READ|PROT_WRITE, MAP_PRIVATE)); - if (brk != MAP_FAILED) { + if (mbrk != MAP_FAILED) { /* We do not need, and cannot use, another sbrk call to find end */ + brk = mbrk; snd_brk = brk + size; /* -- cgit v1.2.1