[PATCH] m68k: amiflop: *ptr incremented past 0x4489

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

 



With while (*ptr++ != 0x4489) { ... } *ptr will be incremented past 0x4489 after
the loop.

Signed-off-by: Roel Kluin <roel.kluin@xxxxxxxxx>
---
diff --git a/drivers/block/amiflop.c b/drivers/block/amiflop.c
index 8df436f..3320b00 100644
--- a/drivers/block/amiflop.c
+++ b/drivers/block/amiflop.c
@@ -662,8 +662,8 @@ static unsigned long scan_sync(unsigned long raw, unsigned long end)
 {
 	ushort *ptr = (ushort *)raw, *endp = (ushort *)end;
 
-	while (ptr < endp && *ptr++ != 0x4489)
-		;
+	while (ptr < endp && *ptr != 0x4489)
+		++ptr;
 	if (ptr < endp) {
 		while (*ptr == 0x4489 && ptr < endp)
 			ptr++;
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux