From: Dmitry V. Levin Date: Mon, 18 Jul 2016 10:34:41 +0000 (+0000) Subject: Fix printing of remaining timeout of recvmmsg syscall X-Git-Tag: v4.13~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3e3b7f64032257025081153074679eca3056f7bc;p=strace Fix printing of remaining timeout of recvmmsg syscall * mmsghdr.c (SYS_FUNC(recvmmsg)): Do not print remaining timeout when the 5th syscall argument is NULL. * tests/mmsg.c (main): Update expected output. --- diff --git a/mmsghdr.c b/mmsghdr.c index 5df6139f..35dfd792 100644 --- a/mmsghdr.c +++ b/mmsghdr.c @@ -148,7 +148,7 @@ SYS_FUNC(recvmmsg) tcp->auxstr = "Timeout"; return RVAL_STR; } - if (!verbose(tcp)) + if (!verbose(tcp) || !tcp->u_arg[4]) return 0; /* timeout on exit */ static char str[sizeof("left") + TIMESPEC_TEXT_BUFSIZE]; diff --git a/tests/mmsg.c b/tests/mmsg.c index 44b62144..88805d16 100644 --- a/tests/mmsg.c +++ b/tests/mmsg.c @@ -177,7 +177,7 @@ main(void) ", msg_iov=[{iov_base=\"%s\", iov_len=%u}" ", {iov_base=\"\", iov_len=%u}], msg_iovlen=%u" ", msg_controllen=0, msg_flags=0}, msg_len=%u}], %u" - ", MSG_DONTWAIT, NULL) = %d (left NULL)\n" + ", MSG_DONTWAIT, NULL) = %d\n" " = %u buffers in vector 0\n" " * %u bytes in buffer 0\n" " | 00000 %-49s %-16s |\n"