From patchwork Mon May 24 15:18:20 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [5/6] make hpet_in_legacy_mode() return a bool Date: Mon, 24 May 2010 05:18:20 -0000 From: Juan Quintela X-Patchwork-Id: 53429 Message-Id: <895477882f47c541992e31068d8dd62b10beb072.1274714215.git.quintela@redhat.com> To: qemu-devel@nongnu.org Signed-off-by: Juan Quintela --- hw/hpet.c | 6 +++--- hw/hpet_emul.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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 */