]> granicus.if.org Git - strace/commitdiff
mem: remove redundant casts
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 11:16:11 +0000 (11:16 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 23 Dec 2016 12:48:46 +0000 (12:48 +0000)
* mem.c (SYS_FUNC(old_mmap)): Remove redundant cast
from kernel_ureg_t to unsigned long.
[S390] (SYS_FUNC(old_mmap_pgoff)): Remove redundant cast
from unsigned int to unsigned long.

mem.c

diff --git a/mem.c b/mem.c
index b683a095ddd00ee33012ff7ec72b2ea06d397b63..5af1db3b65cc2803ba98d283fb2d12e1d730bf77 100644 (file)
--- a/mem.c
+++ b/mem.c
@@ -106,7 +106,7 @@ SYS_FUNC(old_mmap)
        if (umove_or_printaddr(tcp, tcp->u_arg[0], &u_arg))
                return RVAL_DECODED | RVAL_HEX;
 # endif
-       print_mmap(tcp, u_arg, (unsigned long) u_arg[5]);
+       print_mmap(tcp, u_arg, u_arg[5]);
 
        return RVAL_DECODED | RVAL_HEX;
 }
@@ -118,12 +118,12 @@ SYS_FUNC(old_mmap_pgoff)
 {
        kernel_ureg_t u_arg[5];
        int i;
-       unsigned narrow_arg[6];
+       unsigned int narrow_arg[6];
        unsigned long long offset;
        if (umove_or_printaddr(tcp, tcp->u_arg[0], &narrow_arg))
                return RVAL_DECODED | RVAL_HEX;
        for (i = 0; i < 5; i++)
-               u_arg[i] = (unsigned long) narrow_arg[i];
+               u_arg[i] = narrow_arg[i];
        offset = narrow_arg[5];
        offset *= get_pagesize();
        print_mmap(tcp, u_arg, offset);