]> granicus.if.org Git - strace/blobdiff - ipc_shm.c
Update NEWS
[strace] / ipc_shm.c
index e8a8206b9be047b666a78d6bf510af347cb6e759..f9a053744d4083ff1777fc5df99e75b7b87906c3 100644 (file)
--- a/ipc_shm.c
+++ b/ipc_shm.c
@@ -43,8 +43,9 @@
 
 SYS_FUNC(shmget)
 {
-       if (tcp->u_arg[0])
-               tprintf("%#lx", tcp->u_arg[0]);
+       const int key = (int) tcp->u_arg[0];
+       if (key)
+               tprintf("%#x", key);
        else
                tprints("IPC_PRIVATE");
        tprintf(", %lu, ", tcp->u_arg[1]);
@@ -57,7 +58,7 @@ SYS_FUNC(shmget)
 SYS_FUNC(shmat)
 {
        if (entering(tcp)) {
-               tprintf("%lu, ", tcp->u_arg[0]);
+               tprintf("%d, ", (int) tcp->u_arg[0]);
                if (indirect_ipccall(tcp)) {
                        printaddr(tcp->u_arg[3]);
                        tprints(", ");