]> granicus.if.org Git - strace/commitdiff
* system.c (sram_alloc_flag): Add L2_SRAM constant.
authorDenys Vlasenko <dvlasenk@redhat.com>
Mon, 23 Mar 2009 13:12:46 +0000 (13:12 +0000)
committerDenys Vlasenko <dvlasenk@redhat.com>
Mon, 23 Mar 2009 13:12:46 +0000 (13:12 +0000)
by Mike Frysinger (vapier AT gentoo.org).
(sys_sram_alloc): Fix improperly used %zu:
tcp->u_arg is not a size_t, it is a long.
* net.c (printcmsghdr): Fix improperly used %zu:
struct cmsghdr::cmsg_len is not a size_t.

ChangeLog
net.c
system.c

index e53a8ad66f731e01c1cb32956b5ef366e71d440d..4c5a30a264c0efea5ecafd58800dacc9eb8511d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-03-23  Denys Vlasenko  <dvlasenk@redhat.com>
+
+       * system.c (sram_alloc_flag): Add L2_SRAM constant.
+       by Mike Frysinger (vapier AT gentoo.org).
+       (sys_sram_alloc): Fix improperly used %zu:
+       tcp->u_arg is not a size_t, it is a long.
+       * net.c (printcmsghdr): Fix improperly used %zu:
+       struct cmsghdr::cmsg_len is not a size_t.
+
 2009-03-17  Denys Vlasenko  <dvlasenk@redhat.com>
 
        * strace.c (collect_stopped_tcbs): Check for ^C here too,
diff --git a/net.c b/net.c
index 6f3817648eeed66644370a9ec1ea5e55ce7d1a27..9759268194799ef3b240ff9dbaaf76c3b15fe58a 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1110,10 +1110,7 @@ static const struct xlat scmvals[] = {
 };
 
 static void
-printcmsghdr(tcp, addr, len)
-struct tcb *tcp;
-unsigned long addr;
-unsigned long len;
+printcmsghdr(struct tcb *tcp, unsigned long addr, unsigned long len)
 {
        struct cmsghdr *cmsg = len < sizeof(struct cmsghdr) ?
                               NULL : malloc(len);
@@ -1123,7 +1120,7 @@ unsigned long len;
                return;
        }
 
-       tprintf(", {cmsg_len=%zu, cmsg_level=", cmsg->cmsg_len);
+       tprintf(", {cmsg_len=%u, cmsg_level=", (unsigned) cmsg->cmsg_len);
        printxval(socketlayers, cmsg->cmsg_level, "SOL_???");
        tprintf(", cmsg_type=");
 
index 9274a0f92ed1dd8488d7003835bea02559e3bb20..f21dca79f3139dfddd9f1d0a03b3d85541edb373 100644 (file)
--- a/system.c
+++ b/system.c
@@ -302,18 +302,18 @@ static const struct xlat sram_alloc_flags[] = {
        { L1_DATA_A_SRAM,       "L1_DATA_A_SRAM" },
        { L1_DATA_B_SRAM,       "L1_DATA_B_SRAM" },
        { L1_DATA_SRAM,         "L1_DATA_SRAM" },
+       { L2_SRAM,              "L2_SRAM" },
        { 0,                    NULL },
 };
 
 int
-sys_sram_alloc(tcp)
-struct tcb *tcp;
+sys_sram_alloc(struct tcb *tcp)
 {
        if (entering(tcp)) {
                /* size */
-               tprintf("%zu, ", tcp->u_arg[0]);
+               tprintf("%lu, ", tcp->u_arg[0]);
                /* flags */
-               printxval(sram_alloc_flags, tcp->u_arg[1], "L1_???_SRAM");
+               printxval(sram_alloc_flags, tcp->u_arg[1], "???_SRAM");
        }
        return 1;
 }