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


Ignore:
Timestamp:
Dec 10, 2013, 8:50:00 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix typos preventnig compilation !
  • revert mr_getline modifications which where in fact incorrect
  • initialize log earlier so all messages go indeed in it
File:
1 edited

Legend:

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

    r3205 r3208  
    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     }
    8176    ret = getline(lineptr,&n,fd);
    82     if (ret == -1) {
     77    if ((ret == -1) && (! feof(fd))) {
    8378        mr_msg_int(1,line,file,"Unable to alloc memory in mr_getline\nExiting...");
    8479        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, "");
    8584    }
    8685}
Note: See TracChangeset for help on using the changeset viewer.