2002-05-25 Robert Collins <rbtcollins@hotmail.com>

* gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
This commit is contained in:
Robert Collins 2002-05-24 14:24:33 +00:00
parent ff93854697
commit a6247be998
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-05-25 Robert Collins <rbtcollins@hotmail.com>
* gmon.c (fake_sbrk): Correctly return -1 on failed malloc's.
2002-05-24 Christopher Faylor <cgf@redhat.com>
* dtable.cc (dtable::build_fhandler_from_name): Just pass posix path

View File

@ -44,6 +44,7 @@ static char rcsid[] = "$OpenBSD: gmon.c,v 1.8 1997/07/23 21:11:27 kstailey Exp $
#include <gmon.h>
#include <profil.h>
#include <windows.h>
/* XXX needed? */
//extern char *minbrk __asm ("minbrk");
@ -61,7 +62,11 @@ void moncontrol __P((int));
static void *
fake_sbrk(int size)
{
return malloc(size);
void *rv = malloc(size);
if (rv)
return rv;
else
return (void *) -1;
}
void