[PATCH 1/3] partitions/ibm: Remove unnecessary memset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Jan Höppner <hoeppner@xxxxxxxxxxxxx>

The data holding the volume label information is zeroed in case no valid
volume label was found. Since the label information isn't used in that
case, zeroing the data doesn't provide any value whatsoever.

Remove the unnecessary memset() call accordingly.

Signed-off-by: Jan Höppner <hoeppner@xxxxxxxxxxxxx>
Reviewed-by: Stefan Haberland <sth@xxxxxxxxxxxxx>
Signed-off-by: Stefan Haberland <sth@xxxxxxxxxxxxx>
---
 block/partitions/ibm.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/block/partitions/ibm.c b/block/partitions/ibm.c
index 403756dbd50d..49eb0e354fc4 100644
--- a/block/partitions/ibm.c
+++ b/block/partitions/ibm.c
@@ -124,8 +124,6 @@ static int find_label(struct parsed_partitions *state,
 			break;
 		}
 	}
-	if (!found)
-		memset(label, 0, sizeof(*label));
 
 	return found;
 }
-- 
2.39.2




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux