]> granicus.if.org Git - strace/blobdiff - aio.c
tests: check decoding of netlink smc_diag_msg attributes
[strace] / aio.c
diff --git a/aio.c b/aio.c
index 47a4038aca0765cbac29d9b264951b22bdd79e89..7adb20df758a9d4ce7e88c85ae528aeef5778d00 100644 (file)
--- a/aio.c
+++ b/aio.c
@@ -3,6 +3,7 @@
  * Copyright (c) 1993 Branko Lankester <branko@hacktic.nl>
  * Copyright (c) 1993, 1994, 1995, 1996 Rick Sladkey <jrs@world.std.com>
  * Copyright (c) 1996-1999 Wichert Akkerman <wichert@cistron.nl>
+ * Copyright (c) 1999-2017 The strace developers.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -73,7 +74,8 @@ tprint_lio_opcode(unsigned cmd)
                tprints(cmds[cmd].name);
                return cmds[cmd].sub;
        }
-       tprintf("%u /* SUB_??? */", cmd);
+       tprintf("%u", cmd);
+       tprints_comment("SUB_???");
        return SUB_NONE;
 }
 
@@ -87,7 +89,7 @@ print_common_flags(struct tcb *tcp, const struct iocb *cb)
                printfd(tcp, cb->aio_resfd);
        }
        if (cb->aio_flags & ~IOCB_FLAG_RESFD)
-               tprintf(", flags=%x", cb->aio_flags);
+               tprintf(", flags=%#x", cb->aio_flags);
 #endif
 }
 
@@ -165,9 +167,9 @@ print_iocbp(struct tcb *tcp, void *elem_buf, size_t elem_size, void *data)
        struct iocb cb;
 
        if (elem_size < sizeof(kernel_ulong_t)) {
-               addr = * (unsigned int *) elem_buf;
+               addr = *(unsigned int *) elem_buf;
        } else {
-               addr = * (kernel_ulong_t *) elem_buf;
+               addr = *(kernel_ulong_t *) elem_buf;
        }
 
        tprints("{");