From 5136d9ddc74aa32f2d7e5c690c8321ebfcbe955e Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Thu, 14 Feb 2019 10:52:56 +0100 Subject: [PATCH] base: fix timer_ticks_to_us casting error Fix #3155 --- repos/base/include/drivers/timer/util.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/repos/base/include/drivers/timer/util.h b/repos/base/include/drivers/timer/util.h index 48c74a7dc..190eac377 100644 --- a/repos/base/include/drivers/timer/util.h +++ b/repos/base/include/drivers/timer/util.h @@ -40,8 +40,8 @@ namespace Genode { { enum:RESULT_T { HALF_WIDTH = (sizeof(RESULT_T) << 2), - MSB_MASK = ((RESULT_T)~0UL) << HALF_WIDTH, - LSB_MASK = ((RESULT_T)~0UL) >> HALF_WIDTH, + MSB_MASK = (~(RESULT_T)0) << HALF_WIDTH, + LSB_MASK = (~(RESULT_T)0) >> HALF_WIDTH, MSB_RSHIFT = 10, LSB_LSHIFT = HALF_WIDTH - MSB_RSHIFT, };