From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36152) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1I1B-00071v-Ly for qemu-devel@nongnu.org; Sat, 25 Feb 2012 08:50:38 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S1I15-0006qo-Ge for qemu-devel@nongnu.org; Sat, 25 Feb 2012 08:50:33 -0500 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:57344) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S1I15-0006qk-Ar for qemu-devel@nongnu.org; Sat, 25 Feb 2012 08:50:27 -0500 From: Stefan Weil Date: Sat, 25 Feb 2012 14:50:25 +0100 Message-Id: <1330177825-7618-1-git-send-email-sw@weilnetz.de> Subject: [Qemu-devel] [PATCH] ds1338: Add missing break statement List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paul Brook Cc: Stefan Weil , qemu-devel@nongnu.org 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 --- hw/ds1338.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/hw/ds1338.c b/hw/ds1338.c index 6397f0a..d590d9c 100644 --- a/hw/ds1338.c +++ b/hw/ds1338.c @@ -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; -- 1.7.9