- Timestamp:
- Aug 2, 2008, 11:22:11 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
neercs/trunk/src/configuration.c
r2587 r2648 59 59 { 60 60 fclose(fp); 61 printf("Can't allocate memory at %s:%d\n", __FUNCTION__, __LINE__);61 fprintf(stderr, "Can't allocate memory at %s:%d\n", __FUNCTION__, __LINE__); 62 62 return -1; 63 63 } … … 130 130 if(!line) 131 131 { 132 printf("Can't allocate memory at %s:%d\n",132 fprintf(stderr, "Can't allocate memory at %s:%d\n", 133 133 __FUNCTION__, __LINE__); 134 134 return -1; … … 140 140 if(!line) 141 141 { 142 printf("Can't allocate memory at %s:%d\n",142 fprintf(stderr, "Can't allocate memory at %s:%d\n", 143 143 __FUNCTION__, __LINE__); 144 144 return -1; … … 166 166 { 167 167 struct option *option = malloc(sizeof(struct option)); 168 if(!option) 169 { 170 fprintf(stderr, "Can't allocate memory at %s:%d\n", 171 __FUNCTION__, __LINE__); 172 return -1; 173 } 168 174 option->next = NULL; 169 175 l-=end_spaces; … … 196 202 { 197 203 option->value = malloc(strlen(line) - 1); 204 if(!option->value) 205 { 206 fprintf(stderr, "Can't allocate memory at %s:%d\n", 207 __FUNCTION__, __LINE__); 208 return -1; 209 } 198 210 memcpy(option->value, line+1, strlen(line) - 1); 199 211 option->value[strlen(line) - 2] = 0; … … 226 238 if(!cur) 227 239 { 228 printf( "Can't allocate memory at %s:%d\n",240 printf(stderr, "Can't allocate memory at %s:%d\n", 229 241 __FUNCTION__, __LINE__); 230 242 }
Note: See TracChangeset
for help on using the changeset viewer.