Used a correct definition of malloc.
This commit is contained in:
parent
a33d0e8e14
commit
aef211ad4e
|
@ -1,10 +1,12 @@
|
|||
/* $Header $ */
|
||||
/* $Header$ */
|
||||
|
||||
extern char *malloc() ;
|
||||
|
||||
char * salloc(length)
|
||||
int length;
|
||||
{
|
||||
char *c, *s;
|
||||
c= (char *) malloc(length);
|
||||
c= malloc(length);
|
||||
if( c== (char *) -1) error(5);
|
||||
for(s=c;s<c+length;s++) *s = 0;
|
||||
return(c);
|
||||
|
@ -13,6 +15,6 @@ int length;
|
|||
sfree(c)
|
||||
char *c;
|
||||
{
|
||||
if( c== 0) return;
|
||||
if( !c ) return;
|
||||
free(c);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue