]> granicus.if.org Git - strace/commitdiff
Fix printing of remaining timeout of recvmmsg syscall
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 18 Jul 2016 10:34:41 +0000 (10:34 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 19 Jul 2016 17:45:06 +0000 (17:45 +0000)
* mmsghdr.c (SYS_FUNC(recvmmsg)): Do not print remaining timeout
when the 5th syscall argument is NULL.
* tests/mmsg.c (main): Update expected output.

mmsghdr.c
tests/mmsg.c

index 5df6139fecc9521531259ce6f44e37c5cf5c0e69..35dfd792599ef72b6cf7b55afdceab899adfc33d 100644 (file)
--- 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];
index 44b62144bc72e31c2060b87a4b36f382c0115f36..88805d16a97bc6e44766303ba52292885b26eae7 100644 (file)
@@ -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"