diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2016-09-09 19:13:54 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2016-09-09 22:18:11 +0000 |
commit | 06847fe28253603b29539a4d7fcb45a22a9a836c (patch) | |
tree | 908a81790aac8583231f61bc6d506ff06331d1cb /ipc_sem.c | |
parent | 84de545d739ce4c8513864d2cf33e174c3f1ae8d (diff) | |
download | strace-06847fe28253603b29539a4d7fcb45a22a9a836c.tar.gz |
ipc: fix printing of nsops argument of semop and semtimedop syscalls
According to POSIX, nsops argument of semop syscall has type size_t,
but the kernel treats nsops argument of semop and semtimedop syscalls
as unsigned int.
* ipc_sem.c (tprint_sembuf_array): Change type of "count" argument
from unsigned long to unsigned int, print it using %u format.
Diffstat (limited to 'ipc_sem.c')
-rw-r--r-- | ipc_sem.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -57,7 +57,7 @@ print_sembuf(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data) #endif static void -tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned long count) +tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned int count) { #if defined HAVE_SYS_SEM_H || defined HAVE_LINUX_SEM_H struct sembuf sb; @@ -66,7 +66,7 @@ tprint_sembuf_array(struct tcb *tcp, const long addr, const unsigned long count) #else printaddr(addr); #endif - tprintf(", %lu", count); + tprintf(", %u", count); } SYS_FUNC(semop) |