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

[dm-devel] kpartx bug fixes for dos extended partition [4/4]



This mail was not reached to dm-devel.
I'm resending this.

There is meaninglessly duplicated code in read_dos_pt().
It should be safe to remove it.

Thanks,
Nick
Duplicated for loop is non-sense.

--- multipath-tools.orig/kpartx/dos.c	2005-12-02 01:33:29.000000000 +0900
+++ multipath-tools/kpartx/dos.c	2005-12-02 04:11:13.000000000 +0900
@@ -86,9 +86,6 @@ read_dos_pt(int fd, struct slice all, st
 
 	for (i=0; i<4; i++) {
 		memcpy(&p, bp + 0x1be + i * sizeof (p), sizeof (p));
-	}
-	for (i=0; i<4; i++) {
-		memcpy(&p, bp + 0x1be + i * sizeof (p), sizeof (p));
 		if (is_gpt(p.sys_type))
 			return 0;
 		if (i < ns) {

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