1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Changed the assertion message text shown in the requester window.

- The standard malloc() now sets errno to EINVAL for zero length
  allocations.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15066 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-11-20 19:04:10 +00:00
parent e4f9d1b7f6
commit a5a5e36119
2 changed files with 6 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_assertion_failure.c,v 1.10 2005-03-19 11:06:57 obarthel Exp $
* $Id: stdlib_assertion_failure.c,v 1.11 2005-11-20 19:04:10 obarthel Exp $
*
* :ts=4
*
@ -101,7 +101,7 @@ __assertion_failure(
es.es_StructSize = sizeof(es);
es.es_Title = (STRPTR)__program_name;
es.es_TextFormat = (STRPTR)"Assertion of expression\n\"%s\"\nfailed in file \"%s\", line %ld.";
es.es_TextFormat = (STRPTR)"Assertion of condition\n\"%s\"\nfailed in file \"%s\", line %ld.";
es.es_GadgetFormat = (STRPTR)"Sorry";
EasyRequest(NULL,&es,NULL,

View File

@ -1,5 +1,5 @@
/*
* $Id: stdlib_malloc.c,v 1.15 2005-11-20 17:00:22 obarthel Exp $
* $Id: stdlib_malloc.c,v 1.16 2005-11-20 19:04:10 obarthel Exp $
*
* :ts=4
*
@ -116,7 +116,10 @@ __allocate_memory(size_t size,BOOL never_free,const char * UNUSED unused_file,in
/* Zero length allocations are by default rejected. */
if(size == 0)
{
__set_errno(EINVAL);
goto out;
}
if(__free_memory_threshold > 0 && AvailMem(MEMF_ANY|MEMF_LARGEST) < __free_memory_threshold)
{