summaryrefslogtreecommitdiff
path: root/ipc_sem.c
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2016-09-09 19:13:54 +0000
committerDmitry V. Levin <ldv@altlinux.org>2016-09-09 22:18:11 +0000
commit06847fe28253603b29539a4d7fcb45a22a9a836c (patch)
tree908a81790aac8583231f61bc6d506ff06331d1cb /ipc_sem.c
parent84de545d739ce4c8513864d2cf33e174c3f1ae8d (diff)
downloadstrace-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ipc_sem.c b/ipc_sem.c
index 4725a1701..db7974698 100644
--- a/ipc_sem.c
+++ b/ipc_sem.c
@@ -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)