* libparted/labels/gpt.c (gpt_read): Initialize write_back to 0
once again, and set it to 1 on the sole path that requires that.
GPTDiskData *gpt_disk_data = disk->disk_specific;
int i;
#ifndef DISCOVER_ONLY
- int write_back = 1;
+ int write_back = 0;
#endif
ped_disk_delete_all (disk);
case PED_EXCEPTION_FIX:
ptt_clear_sectors (disk->dev,
PED_LE64_TO_CPU (primary_gpt->AlternateLBA), 1);
+ write_back = 1;
break;
default:
- write_back = 0;
break;
}
}
- else
- {
- write_back = 0;
- }
#endif /* !DISCOVER_ONLY */
gpt = primary_gpt;
pth_free (backup_gpt);
goto error_free_gpt;
gpt = primary_gpt;
- write_back = 0;
}
else /* !primary_gpt && backup_gpt */
{
goto error_free_gpt;
gpt = backup_gpt;
- write_back = 0;
}
backup_gpt = NULL;
primary_gpt = NULL;