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

Signed-off-by: Roel Kluin <[email protected]>
---
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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to