OSDN Git Service

linux-user: Simplify timerid checks on g_posix_timers range
authorAlexander Graf <agraf@suse.de>
Fri, 22 Aug 2014 11:56:18 +0000 (13:56 +0200)
committerRiku Voipio <riku.voipio@linaro.org>
Mon, 6 Oct 2014 18:52:45 +0000 (21:52 +0300)
commite52a99f756eff14935edd1893dc9ec7660078f82
tree261b2417c352bb339a63e0d80375327a4d8a8826
parenta59b5e35d181599bc4114ceff3547ef47e713689
linux-user: Simplify timerid checks on g_posix_timers range

We check whether the passed in timer id is negative on all calls
that involve g_posix_timers.

However, these checks are bogus. First off we limit the timer_id to
16 bits which is not what Linux does. Then we check whether it's negative
which it can't be because we masked it.

We can safely remove the masking. For the negativity check we can just
treat the timerid as unsigned and only check for upper boundaries.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/syscall.c