ds1338: Add missing break statement
authorStefan Weil <sw@weilnetz.de>
Sat, 25 Feb 2012 13:50:25 +0000 (14:50 +0100)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Mon, 19 Mar 2012 10:52:52 +0000 (10:52 +0000)
Without the break statement, case 5 sets month and year from the same
data. This does not look correct.

The missing break was reported by splint.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/ds1338.c

index 6397f0aa6f94a86c0768182fa932fc8361ab7b63..d590d9c00780bea47b3f60f227c9b3dcd71be46c 100644 (file)
@@ -100,6 +100,7 @@ static int ds1338_send(I2CSlave *i2c, uint8_t data)
             break;
         case 5:
             s->now.tm_mon = from_bcd(data & 0x1f) - 1;
+            break;
         case 6:
             s->now.tm_year = from_bcd(data) + 100;
             break;