1 - Changed argument from int to unsigned.
authorkeie <none@none>
Mon, 21 Jan 1985 23:54:46 +0000 (23:54 +0000)
committerkeie <none@none>
Mon, 21 Jan 1985 23:54:46 +0000 (23:54 +0000)
2 - The test for a failed malloc is changed from comparison to -1
    to comparison to 0.

lang/basic/lib/salloc.c

index f968fb4..3e13b7d 100644 (file)
@@ -3,11 +3,11 @@
 extern char *malloc() ;
 
 char * salloc(length)
-int length;
+unsigned length;
 {
        char *c, *s;
        c= malloc(length);
-       if( c== (char *) -1) error(5);
+       if( !c ) error(5);
        for(s=c;s<c+length;s++) *s = 0;
        return(c);
 }