Changeset 3236 in MondoRescue for branches/3.2


Ignore:
Timestamp:
Jan 3, 2014, 5:44:07 PM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix again a dyn. memory allocation issue, where a variable wasn't initialized before mr_strcat was used.
Location:
branches/3.2/mondo/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/common/libmondo-mountlist.c

    r3191 r3236  
    555555    drivelist = malloc(sizeof(struct list_of_disks));
    556556    assert(mountlist != NULL);
     557    mr_asprintf(flaws_str, "%s", "");
    557558
    558559    make_list_of_drives_in_mountlist(mountlist, drivelist);
     
    561562
    562563    for (i = 0; i < drivelist->entries; i++) {
    563         if (strstr
    564             (drivelist->el[i].device,
    565              DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE)) {
     564        if (strstr(drivelist->el[i].device, DONT_KNOW_HOW_TO_EVALUATE_THIS_DEVICE_TYPE)) {
    566565            log_it(" Not evaluating %s (I don't know how yet)", drivelist->el[i].device);
    567566        } else {
  • branches/3.2/mondo/src/mondorestore/mondo-rstr-newt.c

    r3194 r3236  
    19331933    flawsLabelB = newtLabel(2, 14, "         ");
    19341934    flawsLabelC = newtLabel(2, 15, "         ");
    1935     partitionsListbox =
    1936         newtListbox(2, 2, 10, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT);
     1935    partitionsListbox = newtListbox(2, 2, 10, NEWT_FLAG_SCROLL | NEWT_FLAG_RETURNEXIT);
    19371936    redraw_mountlist(mountlist, keylist, partitionsListbox);
    19381937    newtOpenWindow(1, 3, 77, 18, "Editing mountlist");
     
    19741973        if (b_res == bOK) {
    19751974            if (flaws_str != NULL) {
    1976                 finished =
    1977                     ask_me_yes_or_no
    1978                     ("Your mountlist might not work. Continue anyway?");
     1975                finished = ask_me_yes_or_no("Your mountlist might not work. Continue anyway?");
    19791976            } else {
    1980                 finished =
    1981                     ask_me_yes_or_no
    1982                     ("Are you sure you want to save your mountlist and continue? (No changes will be made to your partition table at this time.)");
     1977                finished = ask_me_yes_or_no("Are you sure you want to save your mountlist and continue? (No changes will be made to your partition table at this time.)");
    19831978            }
    19841979        } else if (b_res == bCancel) {
     
    19921987        } else {
    19931988            curr_choice = newtListboxGetCurrent(partitionsListbox);
    1994             for (i = 0;
    1995                  i < mountlist->entries && keylist[i] != curr_choice; i++);
     1989            for (i = 0; i < mountlist->entries && keylist[i] != curr_choice; i++);
    19961990            if (i == mountlist->entries && mountlist->entries > 0) {
    19971991                log_to_screen("I don't know what that button does!");
     
    20512045        fatal_error("Don't call edit_mountlist() in text mode");
    20522046    } else {
    2053         log_it
    2054             ("I'm in GUI mode, so I shall edit mountlist using edit_mountlist()");
     2047        log_it("I'm in GUI mode, so I shall edit mountlist using edit_mountlist()");
    20552048        res = edit_mountlist_in_newt(mountlist_fname, mountlist, raidlist);
    20562049    }
Note: See TracChangeset for help on using the changeset viewer.