]> granicus.if.org Git - strace/commitdiff
futex: fix formatting of unknown command argument
authorEugene Syromyatnikov <evgsyr@gmail.com>
Mon, 29 Aug 2016 20:59:01 +0000 (23:59 +0300)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 30 Aug 2016 15:53:51 +0000 (15:53 +0000)
Use alternate form for printing hexadecimal numbers to avoid confusion.
Use printaddr to print uaddr as the latter is interpreted as a pointer
in all currently supported futex operations.

* futex.c (SYS_FUNC(futex)): Fix formatting of unknown command
argument.

futex.c

diff --git a/futex.c b/futex.c
index 4cd52b567820ff1f37e7081aea5d9df6cae2c7ef..1418c89b10ba46f54eedfcb1537b46577b627c76 100644 (file)
--- a/futex.c
+++ b/futex.c
@@ -107,7 +107,10 @@ SYS_FUNC(futex)
        case FUTEX_TRYLOCK_PI:
                break;
        default:
-               tprintf(", %lx, %lx, %x", timeout, uaddr2, val3);
+               tprintf(", %#lx", timeout);
+               tprints(", ");
+               printaddr(uaddr2);
+               tprintf(", %#x", val3);
                break;
        }