qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] ds1338: Add missing break statement
@ 2012-02-25 13:50 Stefan Weil
  2012-02-25 16:06 ` Peter Maydell
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Stefan Weil @ 2012-02-25 13:50 UTC (permalink / raw)
  To: Paul Brook; +Cc: Stefan Weil, qemu-devel

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>
---
 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-03-15 10:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-25 13:50 [Qemu-devel] [PATCH] ds1338: Add missing break statement Stefan Weil
2012-02-25 16:06 ` Peter Maydell
2012-03-10 19:20 ` Stefan Weil
2012-03-10 20:34 ` Andreas Färber
2012-03-15 10:16 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).