comparison lwlink/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
comparison
equal deleted inserted replaced
1:96c4dc89016e 2:7317fbe024af
49 void *ptr; 49 void *ptr;
50 50
51 if (size == 0) 51 if (size == 0)
52 { 52 {
53 lw_free(optr); 53 lw_free(optr);
54 return; 54 return NULL;
55 } 55 }
56 56
57 ptr = realloc(optr, size); 57 ptr = realloc(optr, size);
58 if (!ptr) 58 if (!ptr)
59 { 59 {
60 fprintf(stderr, "lw_realloc(): memory allocation error\n"); 60 fprintf(stderr, "lw_realloc(): memory allocation error\n");
61 exit(1); 61 exit(1);
62 } 62 }
63 return ptr;
63 } 64 }
64 65
65 void lw_free(void *ptr) 66 void lw_free(void *ptr)
66 { 67 {
67 if (ptr) 68 if (ptr)