Ignore:
Timestamp:
Mar 7, 2024, 1:55:18 PM (4 months ago)
Author:
Bruno Cornec
Message:

Change find_my_editor and find_home_of_exe to return dynamically assigned stringsi - adapt whine_if_not_found

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.3/mondo/src/mondorestore/mondo-rstr-compare.c

    r3822 r3866  
    259259
    260260    if (compressor_exe) {
    261         mr_asprintf(tmp, "%s", compressor_exe);
    262         if (!find_home_of_exe(tmp)) {
     261        if ((tmp = find_home_of_exe(compressor_exe)) == NULL) {
    263262            mr_free(tmp);
    264263            mr_free(compressor_exe);
     
    266265            fatal_error("(compare_a_tarball) Compression program missing");
    267266        }
    268         mr_free(tmp);
    269267
    270268        if (use_star) {
     
    278276        } else {
    279277            // afio
    280             mr_asprintf(tmp, "%s", compressor_exe);
    281             mr_free(compressor_exe);
    282278            mr_asprintf(compressor_exe, "-P %s -Z", tmp);
    283             mr_free(tmp);
    284         }
     279        }
     280        mr_free(tmp);
    285281    }
    286282
     
    541537    if (g_text_mode) {
    542538        save_mountlist_to_disk(mountlist, g_mountlist_fname);
    543         sprintf(tmp, "%s %s", find_my_editor(), g_mountlist_fname);
    544         res = system(tmp);
     539        tmp = find_my_editor();
     540        res = mr_system("%s %s", tmp, g_mountlist_fname);
     541        mr_free(tmp);
    545542        load_mountlist(mountlist, g_mountlist_fname);
    546543    } else {
Note: See TracChangeset for help on using the changeset viewer.