]> granicus.if.org Git - strace/blobdiff - io.c
Fix "format not a string literal" warning caused by tprintf(str)
[strace] / io.c
diff --git a/io.c b/io.c
index 7f2f243fed0cb026f8a63b03a926346b62813179..fa51cefb99224ad6e214fdd1aa69eb0671162b13 100644 (file)
--- a/io.c
+++ b/io.c
@@ -426,7 +426,7 @@ sys_ioctl(struct tcb *tcp)
                tprintf(", ");
                iop = ioctl_lookup(tcp->u_arg[1]);
                if (iop) {
-                       tprintf("%s", iop->symbol);
+                       tprints(iop->symbol);
                        while ((iop = ioctl_next_match(iop)))
                                tprintf(" or %s", iop->symbol);
                } else
@@ -434,8 +434,8 @@ sys_ioctl(struct tcb *tcp)
                ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
        }
        else {
-               int ret;
-               if (!(ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2])))
+               int ret = ioctl_decode(tcp, tcp->u_arg[1], tcp->u_arg[2]);
+               if (!ret)
                        tprintf(", %#lx", tcp->u_arg[2]);
                else
                        return ret - 1;