qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [COMMIT bdd7e1b] twl92230: fix old style increment/decrem


From: Anthony Liguori
Subject: [Qemu-commits] [COMMIT bdd7e1b] twl92230: fix old style increment/decrement usage
Date: Wed, 30 Sep 2009 19:01:10 -0000

From: Michael S. Tsirkin <address@hidden>

Modern compilers do not parse "=-" as decrement:
you must use "-=" for that. Same for "=+"/"+=".

Signed-off-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Blue Swirl <address@hidden>

diff --git a/hw/twl92230.c b/hw/twl92230.c
index b15a8bf..68fab88 100644
--- a/hw/twl92230.c
+++ b/hw/twl92230.c
@@ -73,14 +73,14 @@ static inline void menelaus_update(MenelausState *s)
 
 static inline void menelaus_rtc_start(MenelausState *s)
 {
-    s->rtc.next =+ qemu_get_clock(rt_clock);
+    s->rtc.next += qemu_get_clock(rt_clock);
     qemu_mod_timer(s->rtc.hz_tm, s->rtc.next);
 }
 
 static inline void menelaus_rtc_stop(MenelausState *s)
 {
     qemu_del_timer(s->rtc.hz_tm);
-    s->rtc.next =- qemu_get_clock(rt_clock);
+    s->rtc.next -= qemu_get_clock(rt_clock);
     if (s->rtc.next < 1)
         s->rtc.next = 1;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]