Used a correct definition of malloc.

This commit is contained in:
em 1985-01-21 12:35:53 +00:00
parent a33d0e8e14
commit aef211ad4e

View file

@ -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);
}