Ignore:
Timestamp:
Jun 17, 2009, 10:53:23 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Simplify log_it calls when possible (with just a fixed string)
  • issue with truncate_to_drive_name reported by valgrind at restore time. Needs rewrite IMO
File:
1 edited

Legend:

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

    r2219 r2230  
    652652    /*@ buffers ********************************************************* */
    653653    char *drive = NULL;
     654    char *truncdrive = NULL;
    654655
    655656    long long size;
     
    676677        log_msg(8, "Putting %s with size %lli in list of drives", drive, size);
    677678
    678         (void) truncate_to_drive_name(drive);
    679         log_msg(8, "drive truncated to %s", drive);
     679        truncdrive = truncate_to_drive_name(drive);
     680        log_msg(8, "drive truncated to %s", truncdrive);
    680681
    681682        for (j = 0;
    682683             j < noof_drives
    683              && strcmp(drivelist->el[j].device, drive) != 0; j++) {
     684             && strcmp(drivelist->el[j].device, truncdrive) != 0; j++) {
    684685            continue;
    685686        }
    686687        if (j == noof_drives) {
    687             strncpy(drivelist->el[noof_drives++].device, drive, 63);
     688            strcpy(drivelist->el[noof_drives++].device, truncdrive);
    688689        }
    689690        paranoid_free(drive);
     691        paranoid_free(truncdrive);
    690692    }
    691693    drivelist->entries = noof_drives;
Note: See TracChangeset for help on using the changeset viewer.