The timer_gettime and timer_settime syscalls get a timer_t parameter. Since
we now have an internal wrapper type for it, let's make use of it.

We do not need to check for signed < 0 overflows, because we already mask out
the upper bits of the value, rendering the number always unsigned.

Signed-off-by: Alexander Graf <ag...@suse.de>
---
 linux-user/syscall.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index b7f12b6..96d74df 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9617,7 +9617,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
     {
         /* args: timer_t timerid, int flags, const struct itimerspec 
*new_value,
          * struct itimerspec * old_value */
-        target_ulong timerid = arg1;
+        target_timer_t timerid = arg1;
 
         /* Convert QEMU provided timer ID back to internal 16bit index format 
*/
         if ((timerid & TIMER_MAGIC_MASK) == TIMER_MAGIC) {
@@ -9646,7 +9646,7 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
     case TARGET_NR_timer_gettime:
     {
         /* args: timer_t timerid, struct itimerspec *curr_value */
-        target_ulong timerid = arg1;
+        target_timer_t timerid = arg1;
 
         /* Convert QEMU provided timer ID back to internal 16bit index format 
*/
         if ((timerid & TIMER_MAGIC_MASK) == TIMER_MAGIC) {
-- 
1.7.12.4


Reply via email to