Simplify configure, quiet warnings (from Wacko).

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2674 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Adam Fedor 1997-12-11 19:09:56 +00:00
parent abd9af2aa3
commit d286ed38b2
21 changed files with 85 additions and 92 deletions

View file

@ -57,6 +57,7 @@
*/
#include <config.h>
#include <objc/objc-api.h>
#include <gnustep/base/preface.h>
#include <gnustep/base/MallocAddress.h>
#include <Foundation/byte_order.h>
@ -1218,6 +1219,12 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len)
[aCoder decodeValueOfObjCType:"I" at: &l];
b = malloc(l);
if (b == 0)
{
NSLog(@"[NSDataMalloc -initWithCode:] unable to allocate %lu bytes", l);
[self dealloc];
return nil;
}
[aCoder decodeArrayOfObjCType:"C" count: l at: b];
return [self initWithBytesNoCopy: b length: l];
}
@ -1585,7 +1592,13 @@ readContentsOfFile(NSString* path, void** buf, unsigned* len)
void* b;
[aCoder decodeValueOfObjCType:"I" at: &l];
b = malloc(l);
b = objc_malloc(l);
if (b == 0)
{
NSLog(@"[NSMutableDataMalloc -initWithCode:] unable to allocate %lu bytes", l);
[self dealloc];
return nil;
}
[aCoder decodeArrayOfObjCType:"C" count: l at: b];
return [self initWithBytesNoCopy: b length: l];
}