diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2016-05-26 10:12:17 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2016-05-26 14:44:13 +0000 |
commit | 84a979c9eea59658aabc9b7d547e642b090922be (patch) | |
tree | 8ae0878a7ecc706810ce880acc9f6105d61a1297 /dirent.c | |
parent | 51507201ea2f6761cea264f026a9b40520e7a14a (diff) | |
download | strace-84a979c9eea59658aabc9b7d547e642b090922be.tar.gz |
Fix explicit casts of signed integer types to unsigned long long
* defs.h (widen_to_ull): New macro.
* dirent.c (print_old_dirent, SYS_FUNC(getdents)): Use it in place
of explicit casts to unsigned long long.
* io.c (print_lld_from_low_high_val): Likewise.
* lseek.c (SYS_FUNC(llseek)): Likewise.
* printsiginfo.c (print_si_info): Likewise.
* printstat.h (DO_PRINTSTAT): Likewise.
* sysinfo.c (SYS_FUNC(sysinfo)): Likewise.
* times.c (SYS_FUNC(times)): Likewise.
* fetch_struct_statfs.c (ASSIGN_NUMBER): Remove.
(fetch_struct_statfs, fetch_struct_statfs64): Replace ASSIGN_NUMBER
with widen_to_ull.
Diffstat (limited to 'dirent.c')
-rw-r--r-- | dirent.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -48,8 +48,8 @@ print_old_dirent(struct tcb *tcp, long addr) return; tprintf("{d_ino=%llu, d_off=%llu, d_reclen=%u, d_name=", - (unsigned long long) d.d_ino, - (unsigned long long) d.d_off, d.d_reclen); + widen_to_ull(d.d_ino), + widen_to_ull(d.d_off), d.d_reclen); if (d.d_reclen > D_NAME_LEN_MAX) d.d_reclen = D_NAME_LEN_MAX; printpathn(tcp, addr + offsetof(kernel_dirent, d_name), d.d_reclen); @@ -127,8 +127,8 @@ SYS_FUNC(getdents) tprintf("%s{d_ino=%llu, d_off=%llu, d_reclen=%u" ", d_name=", i ? ", " : "", - (unsigned long long) d->d_ino, - (unsigned long long) d->d_off, d->d_reclen); + widen_to_ull(d->d_ino), + widen_to_ull(d->d_off), d->d_reclen); if (print_quoted_string(d->d_name, d_name_len, QUOTE_0_TERMINATED) > 0) { |