Changeset 3205 in MondoRescue for branches/3.2/mondo/src/lib/mr_mem.c


Ignore:
Timestamp:
Dec 6, 2013, 3:40:47 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix mondoarchive which now works in text mode. GUI mode still not working and crashing on first update for backup. Needs more

investigation in newt-specific.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/lib/mr_mem.c

    r3185 r3205  
    7474    size_t n = 0;
    7575
     76    /*  We reached end of file, allocating empty string */
     77    if (feof(fd)) {
     78        mr_asprintf_int(lineptr, line, file, "");
     79        return;
     80    }
    7681    ret = getline(lineptr,&n,fd);
    77     if ((ret == -1) && (! feof(fd))) {
     82    if (ret == -1) {
    7883        mr_msg_int(1,line,file,"Unable to alloc memory in mr_getline\nExiting...");
    7984        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, "");
    8485    }
    8586}
Note: See TracChangeset for help on using the changeset viewer.