From c2e988c3d5b08f815bc7713ffac3ac928be0d344 Mon Sep 17 00:00:00 2001 From: keie Date: Mon, 21 Jan 1985 23:54:46 +0000 Subject: [PATCH] 1 - Changed argument from int to unsigned. 2 - The test for a failed malloc is changed from comparison to -1 to comparison to 0. --- lang/basic/lib/salloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/basic/lib/salloc.c b/lang/basic/lib/salloc.c index f968fb4e1..3e13b7d7d 100644 --- a/lang/basic/lib/salloc.c +++ b/lang/basic/lib/salloc.c @@ -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