]> granicus.if.org Git - strace/blobdiff - poll.c
signal: fix omission of field names in sigaction printers
[strace] / poll.c
diff --git a/poll.c b/poll.c
index afe0493acdb1771331ce1f0b63f9bb7eae870e5f..b66c46d8a0019a7d854166c15a741fef1b4ed6ac 100644 (file)
--- a/poll.c
+++ b/poll.c
@@ -40,7 +40,7 @@ print_pollfd(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
        printfd(tcp, fds->fd);
        if (fds->fd >= 0) {
                tprints(", events=");
-               printflags(pollflags, fds->events, "POLL???");
+               printflags(pollflags, (unsigned short) fds->events, "POLL???");
        }
        tprints("}");
 
@@ -112,7 +112,8 @@ decode_poll_exiting(struct tcb *tcp, const long pts)
                char fdstr[sizeof(fmt) + sizeof(int) * 3];
                sprintf(fdstr, fmt, fds.fd);
 
-               const char *flagstr = sprintflags("", pollflags, fds.revents);
+               const char *flagstr = sprintflags("", pollflags,
+                                                 (unsigned short) fds.revents);
 
                if (outptr + strlen(fdstr) + strlen(flagstr) + 1 >=
                    end_outstr - (2 + 2 * sizeof(long) + sizeof(", ], ..."))) {