parted/0023-dos-Fix-gcc-complaints-when-using-boot_code-pointer.patch
DistroBaker b7125dc640 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/parted.git#633c371306f0da38c70879e948b612775032740a
2020-12-01 18:08:09 +00:00

26 lines
739 B
Diff

From 1ff56b03ec960435d55e200300093581ba874d53 Mon Sep 17 00:00:00 2001
From: "Brian C. Lane" <bcl@redhat.com>
Date: Mon, 9 Nov 2020 15:09:07 -0800
Subject: [PATCH 23/42] dos: Fix gcc complaints when using boot_code pointer
---
libparted/labels/dos.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index d859b33..bfa253b 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -1291,7 +1291,7 @@ msdos_write (const PedDisk* disk)
DosRawTable *table = (DosRawTable *) s0;
if (!table->boot_code[0]) {
- memset (table->boot_code, 0, 512);
+ memset (table, 0, 512);
memcpy (table->boot_code, MBR_BOOT_CODE, sizeof (MBR_BOOT_CODE));
}
--
2.26.2