mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Changes from richard and wacko.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2521 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7a235b4935
commit
ab180cbd8c
9 changed files with 163 additions and 117 deletions
|
@ -1626,7 +1626,12 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len)
|
|||
{
|
||||
if (size != capacity)
|
||||
{
|
||||
void* tmp = objc_realloc(bytes, size);
|
||||
void* tmp;
|
||||
|
||||
if (bytes)
|
||||
tmp = realloc(bytes, size);
|
||||
else
|
||||
tmp = malloc(size);
|
||||
|
||||
if (tmp == 0)
|
||||
[NSException raise:NSMallocException
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue