Changeset 2649
- Timestamp:
- Aug 2, 2008, 11:24:36 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
neercs/trunk/src/configuration.c
r2648 r2649 214 214 215 215 cur = malloc(1); 216 if(!cur) 217 { 218 fprintf(stderr, "Can't allocate memory at %s:%d\n", 219 __FUNCTION__, __LINE__); 220 return -1; 221 } 216 222 cur[0] = 0; 217 223 … … 226 232 cur[o-end_spaces] = 0; 227 233 cur = realloc(cur, (o-end_spaces)+1); 234 if(!cur) 235 { 236 fprintf(stderr, "Can't allocate memory at %s:%d\n", 237 __FUNCTION__, __LINE__); 238 return -1; 239 } 228 240 o = 0; 229 241 option->key = cur; … … 238 250 if(!cur) 239 251 { 240 printf(stderr, "Can't allocate memory at %s:%d\n",252 fprintf(stderr, "Can't allocate memory at %s:%d\n", 241 253 __FUNCTION__, __LINE__); 254 return -1; 242 255 } 243 256 cur[o] = line[i];
Note: See TracChangeset
for help on using the changeset viewer.