From: Dmitry V. Levin Date: Fri, 23 Dec 2016 11:16:11 +0000 (+0000) Subject: mem: remove redundant casts X-Git-Tag: v4.16~289 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c9c12279994307c05ca8246ac5f98e37cac57d3;p=strace mem: remove redundant casts * 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. --- diff --git a/mem.c b/mem.c index b683a095..5af1db3b 100644 --- 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);