Ignore:
Timestamp:
Aug 18, 2009, 3:13:54 PM (15 years ago)
Author:
Bruno Cornec
Message:

r3335@localhost: bruno | 2009-08-08 23:04:12 +0200

  • Change mr_asprintf to avoid the need of pointer and be consistent with the other mr_mem functions
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-raid.c

    r2323 r2324  
    471471{
    472472    FILE *fin;
    473     char *tmp1 = NULL;
    474473    int items;
    475474
     
    585584    fclose(fin);
    586585    log_it("Raidtab loaded successfully.");
    587     mr_asprintf(tmp1, "%d RAID devices in raidtab", raidlist->entries);
    588     log_it(tmp1);
    589     mr_free(tmp1);
     586    log_it("%d RAID devices in raidtab", raidlist->entries);
    590587    return (0);
    591588}
     
    687684
    688685    /*@ add mallocs * */
    689     char *tmp = NULL;
    690686    char *labelB;
    691687    char *valueB;
     
    744740        }
    745741        if (!disklist) {
    746             mr_asprintf(tmp, "Ignoring '%s %s' pair of disk %s", labelB, valueB, label);
    747             log_it(tmp);
    748             mr_free(tmp);
     742            log_it("Ignoring '%s %s' pair of disk %s", labelB, valueB, label);
    749743        } else {
    750744            index = atoi(valueB);
     
    10081002    mr_asprintf(strtmp, "%s", pos);
    10091003    strcpy(string, strtmp);
    1010     paranoid_free(strtmp);
     1004    mr_free(strtmp);
    10111005    // if we have newline after only spaces, this is a blank line, update
    10121006    // counters, otherwise do normal parsing
     
    10291023    mr_asprintf(strtmp,"%s%s", device_prefix, token);
    10301024    strcpy(raidlist->el[raidlist->entries].raid_device, strtmp);
    1031     paranoid_free(strtmp);
     1025    mr_free(strtmp);
    10321026    mr_free(token);
    10331027    // skip ':' and status
     
    10881082        mr_asprintf(strtmp,"%s%s", device_prefix, token);
    10891083        strcpy(raidlist->el[raidlist->entries].data_disks.el[raidlist->el[raidlist->entries].data_disks.entries].device, strtmp);
    1090         paranoid_free(strtmp);
     1084        mr_free(strtmp);
    10911085        raidlist->el[raidlist->entries].data_disks.entries++;
    10921086        break;
     
    10951089        mr_asprintf(strtmp,"%s%s", device_prefix, token);
    10961090        strcpy(raidlist->el[raidlist->entries].spare_disks.el[raidlist->el[raidlist->entries].spare_disks.entries].device, strtmp);
    1097         paranoid_free(strtmp);
     1091        mr_free(strtmp);
    10981092        raidlist->el[raidlist->entries].spare_disks.entries++;
    10991093        break;
     
    11021096        mr_asprintf(strtmp,"%s%s", device_prefix, token);
    11031097        strcpy(raidlist->el[raidlist->entries].failed_disks.el[raidlist->el[raidlist->entries].failed_disks.entries].device, strtmp);
    1104         paranoid_free(strtmp);
     1098        mr_free(strtmp);
    11051099        raidlist->el[raidlist->entries].failed_disks.entries++;
    11061100        log_it("At least one failed disk found in RAID array.\n");
Note: See TracChangeset for help on using the changeset viewer.