Changeset 3205 in MondoRescue for branches/3.2/mondo/src/lib/mr_mem.c
- Timestamp:
- Dec 6, 2013, 3:40:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/lib/mr_mem.c
r3185 r3205 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 } 76 81 ret = getline(lineptr,&n,fd); 77 if ( (ret == -1) && (! feof(fd))) {82 if (ret == -1) { 78 83 mr_msg_int(1,line,file,"Unable to alloc memory in mr_getline\nExiting..."); 79 84 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, "");84 85 } 85 86 }
Note:
See TracChangeset
for help on using the changeset viewer.