[parted-devel] [PATCH] avoid double inizialization in mac_partition_new

Olaf Hering olh at suse.de
Tue Jul 18 06:20:29 UTC 2006


The memset initializes everything to zero. No need to do it manually.
---
 libparted/labels/mac.c |   11 -----------
 1 file changed, 11 deletions(-)

Index: parted-1.7.1/libparted/labels/mac.c
===================================================================
--- parted-1.7.1.orig/libparted/labels/mac.c
+++ parted-1.7.1/libparted/labels/mac.c
@@ -1125,17 +1125,6 @@ mac_partition_new (
 			goto error_free_part;
 
 		memset (mac_data, 0, sizeof (MacPartitionData));
-
-		mac_data->data_region_length = 0;
-		mac_data->boot_region_length = 0;
-		mac_data->is_driver = 0;
-		mac_data->has_driver = 0;
-		mac_data->is_boot = 0;
-		mac_data->is_root = 0;
-		mac_data->is_swap = 0;
-		mac_data->is_lvm = 0;
-		mac_data->is_raid = 0;
-
 		strcpy (mac_data->volume_name, "untitled");
 	} else {
 		part->disk_specific = NULL;



More information about the parted-devel mailing list