diff mbox

[5/6] make hpet_in_legacy_mode() return a bool

Message ID 895477882f47c541992e31068d8dd62b10beb072.1274714215.git.quintela@redhat.com
State New
Headers show

Commit Message

Juan Quintela May 24, 2010, 3:18 p.m. UTC
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/hpet.c      |    6 +++---
 hw/hpet_emul.h |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/hw/hpet.c b/hw/hpet.c
index 0ef3335..33d7f5e 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -39,12 +39,12 @@ 

 static HPETState *hpet_statep;

-uint32_t hpet_in_legacy_mode(void)
+bool hpet_in_legacy_mode(void)
 {
     if (hpet_statep)
-        return hpet_statep->config & HPET_CFG_LEGACY;
+        return (hpet_statep->config & HPET_CFG_LEGACY) != 0;
     else
-        return 0;
+        return false;
 }

 static uint32_t timer_int_route(struct HPETTimer *timer)
diff --git a/hw/hpet_emul.h b/hw/hpet_emul.h
index b6fae0a..4f90faa 100644
--- a/hw/hpet_emul.h
+++ b/hw/hpet_emul.h
@@ -17,9 +17,9 @@  extern int no_hpet;

 #if !defined(TARGET_I386)

-static inline uint32_t hpet_in_legacy_mode(void)
+static inline bool hpet_in_legacy_mode(void)
 {
-    return 0;
+    return false;
 }

 #else
@@ -85,7 +85,7 @@  typedef struct HPETState {
     uint64_t hpet_counter;      /* main counter */
 } HPETState;

-extern uint32_t hpet_in_legacy_mode(void);
+extern bool hpet_in_legacy_mode(void);
 extern void hpet_init(qemu_irq *irq);
 #endif /* TARGET_I386 */