]> granicus.if.org Git - strace/commitdiff
Remove recently introduced use of ULONG_MAX
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 1 May 2012 20:30:02 +0000 (20:30 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 1 May 2012 20:30:02 +0000 (20:30 +0000)
* io.c: Remove limits.h inclusion.
(tprint_iov): Use "(unsigned long) -1L" instead of "ULONG_MAX".
* net.c: Remove limits.h inclusion.
(printmmsghdr, sys_sendmsg): Use "(unsigned long) -1L" instead of
"ULONG_MAX".

io.c
net.c

diff --git a/io.c b/io.c
index bf5baa2968ed9b97b321e5370903932a7e3e6108..6b3f4b70d9f8c665198dd33a8690f5b1235c78d0 100644 (file)
--- a/io.c
+++ b/io.c
@@ -30,7 +30,6 @@
 
 #include "defs.h"
 #include <fcntl.h>
-#include <limits.h>
 #if HAVE_SYS_UIO_H
 # include <sys/uio.h>
 #endif
@@ -143,7 +142,7 @@ tprint_iov_upto(struct tcb *tcp, unsigned long len, unsigned long addr, int deco
 void
 tprint_iov(struct tcb *tcp, unsigned long len, unsigned long addr, int decode_iov)
 {
-       tprint_iov_upto(tcp, len, addr, decode_iov, ULONG_MAX);
+       tprint_iov_upto(tcp, len, addr, decode_iov, (unsigned long) -1L);
 }
 
 int
diff --git a/net.c b/net.c
index fba521be564ee65e4e0ffbdedde0bfa94f782688..050b746bf377922e58ff2d2450dbc9f242ad8d65 100644 (file)
--- a/net.c
+++ b/net.c
@@ -29,7 +29,6 @@
  */
 
 #include "defs.h"
-#include <limits.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <sys/un.h>
@@ -1455,7 +1454,7 @@ printmmsghdr(struct tcb *tcp, long addr, unsigned int idx)
                return;
        }
        tprints("{");
-       do_msghdr(tcp, &mmsg.msg_hdr, ULONG_MAX);
+       do_msghdr(tcp, &mmsg.msg_hdr, (unsigned long) -1L);
        tprintf(", %u}", mmsg.msg_len);
 }
 
@@ -1639,7 +1638,7 @@ sys_sendmsg(struct tcb *tcp)
 {
        if (entering(tcp)) {
                tprintf("%ld, ", tcp->u_arg[0]);
-               printmsghdr(tcp, tcp->u_arg[1], ULONG_MAX);
+               printmsghdr(tcp, tcp->u_arg[1], (unsigned long) -1L);
                /* flags */
                tprints(", ");
                printflags(msg_flags, tcp->u_arg[2], "MSG_???");