Changeset 3208 in MondoRescue for branches/3.2/mondo/src/lib
- Timestamp:
- Dec 10, 2013, 8:50:00 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/lib/mr_mem.c
r3205 r3208 74 74 size_t n = 0; 75 75 76 /* We reached end of file, allocating empty string */77 if (feof(fd)) {78 mr_asprintf_int(lineptr, line, file, "");79 return;80 }81 76 ret = getline(lineptr,&n,fd); 82 if ( ret == -1) {77 if ((ret == -1) && (! feof(fd))) { 83 78 mr_msg_int(1,line,file,"Unable to alloc memory in mr_getline\nExiting..."); 84 79 mr_exit(-1,"Unable to alloc memory in mr_getline"); 80 } 81 /* We reached end of file, allocating empty string */ 82 if (ret == -1) { 83 mr_asprintf_int(lineptr, line, file, ""); 85 84 } 86 85 }
Note:
See TracChangeset
for help on using the changeset viewer.