[parted-devel] [PATCH 09/24] dos: Fix gcc complaints when using boot_code pointer

Brian C. Lane bcl at redhat.com
Sat Nov 14 00:11:52 GMT 2020


---
 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




More information about the parted-devel mailing list