Ignore:
Timestamp:
Apr 27, 2015, 4:25:28 PM (5 years ago)
Author:
Bruno Cornec
Message:

Change the bkpinfo->boot_device from statically allocated to dynamically allocated

File:
1 edited

Legend:

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

    r3353 r3373  
    596596
    597597    update_evalcall_form(2);
    598     if (!bkpinfo->nonbootable_backup && (bkpinfo->boot_loader == '\0' || bkpinfo->boot_device[0] == '\0')) {
     598    if (!bkpinfo->nonbootable_backup && (bkpinfo->boot_loader == '\0' || bkpinfo->boot_device == NULL)) {
    599599
    600600#ifdef __FreeBSD__
     
    638638            bkpinfo->boot_loader = ch;
    639639        }
    640         if (bkpinfo->boot_device[0] != '\0') {
     640        if (bkpinfo->boot_device != NULL) {
    641641            log_msg(2, "User specified boot device. It is '%s'.", bkpinfo->boot_device);
    642642        } else {
    643             strcpy(bkpinfo->boot_device, bootdev);
     643            mr_asprintf(bkpinfo->boot_device, "%s", bootdev);
    644644        }
    645645    }
Note: See TracChangeset for help on using the changeset viewer.