Ignore:
Timestamp:
Nov 18, 2016, 5:31:43 PM (7 years ago)
Author:
Bruno Cornec
Message:

mr_strip_spaces now returns a dynamically allocated string

File:
1 edited

Legend:

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

    r3610 r3614  
    426426    char *incoming = NULL;
    427427    char *p = NULL;
     428    char *res = NULL;
    428429
    429430    assert(fin != NULL);
     
    433434    }
    434435
    435     for (mr_getline(incoming, fin); !feof(fin); mr_getline(incoming, fin)) {
    436         log_msg(10,"Found in raidtab line: %s",incoming);
    437         mr_strip_spaces(incoming);
     436    for (mr_getline(res, fin); !feof(fin); mr_getline(res, fin)) {
     437        log_msg(10,"Found in raidtab line: %s",res);
     438        incoming = mr_strip_spaces(res);
     439        mr_free(res);
    438440        p = strchr(incoming, ' ');
    439441        if (strlen(incoming) < 3 || incoming[0] == '#' || !p) {
Note: See TracChangeset for help on using the changeset viewer.