diff lwar/util.c @ 2:7317fbe024af

Clean up insane number of compiler warnings under -Wall
author lost@l-w.ca
date Thu, 20 Jan 2011 22:39:46 -0700
parents 2c24602be78f
children
line wrap: on
line diff
--- a/lwar/util.c	Wed Jan 19 22:31:00 2011 -0700
+++ b/lwar/util.c	Thu Jan 20 22:39:46 2011 -0700
@@ -52,7 +52,7 @@
 	if (size == 0)
 	{
 		lw_free(optr);
-		return;
+		return NULL;
 	}
 	
 	ptr = realloc(optr, size);
@@ -61,6 +61,7 @@
 		fprintf(stderr, "lw_realloc(): memory allocation error\n");
 		exit(1);
 	}
+	return ptr;
 }
 
 void lw_free(void *ptr)