From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tiunq-0007dy-TX for qemu-devel@nongnu.org; Wed, 12 Dec 2012 17:29:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tiunp-00054S-Gs for qemu-devel@nongnu.org; Wed, 12 Dec 2012 17:29:22 -0500 Received: from mail-ea0-f173.google.com ([209.85.215.173]:54745) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tiunp-00054L-Ax for qemu-devel@nongnu.org; Wed, 12 Dec 2012 17:29:21 -0500 Received: by mail-ea0-f173.google.com with SMTP id i13so445814eaa.4 for ; Wed, 12 Dec 2012 14:29:20 -0800 (PST) Message-ID: <50C90537.10407@gmail.com> Date: Wed, 12 Dec 2012 23:29:11 +0100 From: Antoine Mathys MIME-Version: 1.0 References: <50C9041A.8020202@gmail.com> In-Reply-To: <50C9041A.8020202@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 1/6] hw/ds1338.c: Correct bug in conversion to BCD. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , paul@codesourcery.com Signed-off-by: Antoine Mathys --- hw/ds1338.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ds1338.c b/hw/ds1338.c index b576d56..faaa4a0 100644 --- a/hw/ds1338.c +++ b/hw/ds1338.c @@ -57,9 +57,9 @@ static void capture_current_time(DS1338State *s) } else { s->nvram[2] = to_bcd(now.tm_hour); } - s->nvram[3] = to_bcd(now.tm_wday) + 1; + s->nvram[3] = to_bcd(now.tm_wday + 1); s->nvram[4] = to_bcd(now.tm_mday); - s->nvram[5] = to_bcd(now.tm_mon) + 1; + s->nvram[5] = to_bcd(now.tm_mon + 1); s->nvram[6] = to_bcd(now.tm_year - 100); } -- 1.7.10.4