]> granicus.if.org Git - strace/commitdiff
evdev: cast tcp->u_rval to kernel_ureg_t instead of unsigned long
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 21 Dec 2016 14:12:17 +0000 (14:12 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 21 Dec 2016 23:35:28 +0000 (23:35 +0000)
* evdev.c (decode_bitset): Cast tcp->u_rval to kernel_ureg_t
instead of unsigned long.

evdev.c

diff --git a/evdev.c b/evdev.c
index 2d02b3c7b7f2d11e1e82028054bce4748d81e29a..779b02ed7cef926cd379628bf3f397203a593f4d 100644 (file)
--- a/evdev.c
+++ b/evdev.c
@@ -268,7 +268,7 @@ decode_bitset(struct tcb *tcp, long arg, const struct xlat decode_nr[],
        tprints(", ");
 
        unsigned int size;
-       if ((unsigned long) tcp->u_rval > max_nr)
+       if ((kernel_ureg_t) tcp->u_rval > max_nr)
                size = max_nr;
        else
                size = tcp->u_rval;