libfdisk: fix compiler warning [-Wmaybe-uninitialized]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-07-18 10:00:18 +02:00
parent 4d43029b72
commit b9144a43c0
1 changed files with 2 additions and 2 deletions

View File

@ -945,7 +945,7 @@ static ssize_t read_lba(struct fdisk_context *cxt, uint64_t lba,
static unsigned char *gpt_read_entries(struct fdisk_context *cxt,
struct gpt_header *header)
{
size_t sz;
size_t sz = 0;
ssize_t ssz;
unsigned char *ret = NULL;
@ -1971,7 +1971,7 @@ static int gpt_write_partitions(struct fdisk_context *cxt,
struct gpt_header *header, unsigned char *ents)
{
off_t offset = (off_t) le64_to_cpu(header->partition_entry_lba) * cxt->sector_size;
size_t towrite;
size_t towrite = 0;
ssize_t ssz;
int rc;