Ignore:
Timestamp:
Sep 20, 2013, 2:29:57 PM (7 years ago)
Author:
Bruno Cornec
Message:

Simplify the interface of mr_getline and mr_asprintf. With 3.1 compatibility now will allow backports from this branch into 3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/common/libmondo-string.c

    r3150 r3185  
    817817
    818818    assert_string_is_neither_NULL_nor_zerolength(partition);
    819     mr_asprintf(&trunc, "%s", partition);
     819    mr_asprintf(trunc, "%s", partition);
    820820
    821821#ifdef __FreeBSD__
     
    11221122    switch (type_of_bkp) {
    11231123    case dvd:
    1124         mr_asprintf(&type_of_backup, "DVD");
     1124        mr_asprintf(type_of_backup, "DVD");
    11251125        break;
    11261126    case cdr:
    1127         mr_asprintf(&type_of_backup, "CDR");
     1127        mr_asprintf(type_of_backup, "CDR");
    11281128        break;
    11291129    case cdrw:
    1130         mr_asprintf(&type_of_backup, "CDRW");
     1130        mr_asprintf(type_of_backup, "CDRW");
    11311131        break;
    11321132    case tape:
    1133         mr_asprintf(&type_of_backup, "tape");
     1133        mr_asprintf(type_of_backup, "tape");
    11341134        break;
    11351135    case cdstream:
    1136         mr_asprintf(&type_of_backup, "CDR");
     1136        mr_asprintf(type_of_backup, "CDR");
    11371137        break;
    11381138    case udev:
    1139         mr_asprintf(&type_of_backup, "udev");
     1139        mr_asprintf(type_of_backup, "udev");
    11401140        break;
    11411141    case iso:
    1142         mr_asprintf(&type_of_backup, "ISO");
     1142        mr_asprintf(type_of_backup, "ISO");
    11431143        break;
    11441144    case netfs:
    1145         mr_asprintf(&type_of_backup, "%s", bkpinfo->netfs_proto);
     1145        mr_asprintf(type_of_backup, "%s", bkpinfo->netfs_proto);
    11461146        break;
    11471147    case usb:
    1148         mr_asprintf(&type_of_backup, "USB");
     1148        mr_asprintf(type_of_backup, "USB");
    11491149        break;
    11501150    default:
    1151         mr_asprintf(&type_of_backup, "ISO");
     1151        mr_asprintf(type_of_backup, "ISO");
    11521152    }
    11531153    return (type_of_backup);
Note: See TracChangeset for help on using the changeset viewer.