diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2012-02-25 02:38:52 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2012-02-25 02:38:52 +0100 |
commit | 8470374cba7df0e70653d95c4f336a4082c68d82 (patch) | |
tree | c19e6dbf96fae4d4229bc7fc79fd3b0d5edeebe4 /net.c | |
parent | 5afdf12572bee4ddf5a7b136d94fde024a01f642 (diff) | |
download | strace-8470374cba7df0e70653d95c4f336a4082c68d82.tar.gz strace-8470374cba7df0e70653d95c4f336a4082c68d82.tar.bz2 strace-8470374cba7df0e70653d95c4f336a4082c68d82.tar.xz |
Cleanup after non-Linux code removal.
Conditions such as defined(LINUX) are always true now,
defined(FREEBSD) etc are always false.
When if directive has them as subexpressions, it can be simplified.
Another trivial changes here are fixes for directive indentation.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'net.c')
-rw-r--r-- | net.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1218,7 +1218,7 @@ printsock(struct tcb *tcp, long addr, int addrlen) #ifdef HAVE_INET_NTOP struct sockaddr_in6 sa6; #endif -#if defined(LINUX) && defined(AF_IPX) +#if defined(AF_IPX) struct sockaddr_ipx sipx; #endif #ifdef AF_PACKET @@ -1297,7 +1297,7 @@ printsock(struct tcb *tcp, long addr, int addrlen) #endif break; #endif -#if defined(AF_IPX) && defined(linux) +#if defined(AF_IPX) case AF_IPX: { int i; @@ -1315,7 +1315,7 @@ printsock(struct tcb *tcp, long addr, int addrlen) tprintf("/[%02x]", addrbuf.sipx.sipx_type); } break; -#endif /* AF_IPX && linux */ +#endif /* AF_IPX */ #ifdef AF_PACKET case AF_PACKET: { @@ -1332,7 +1332,7 @@ printsock(struct tcb *tcp, long addr, int addrlen) } break; -#endif /* AF_APACKET */ +#endif /* AF_PACKET */ #ifdef AF_NETLINK case AF_NETLINK: tprintf("pid=%d, groups=%08x", addrbuf.nl.nl_pid, addrbuf.nl.nl_groups); @@ -1800,14 +1800,14 @@ do_pipe(struct tcb *tcp, int flags_arg) if (syserror(tcp)) { tprintf("%#lx", tcp->u_arg[0]); } else { -#if defined(LINUX) && !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64) +#if !defined(SPARC) && !defined(SPARC64) && !defined(SH) && !defined(IA64) int fds[2]; if (umoven(tcp, tcp->u_arg[0], sizeof fds, (char *) fds) < 0) tprints("[...]"); else tprintf("[%u, %u]", fds[0], fds[1]); -#elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(SVR4) || defined(FREEBSD) || defined(IA64) +#elif defined(SPARC) || defined(SPARC64) || defined(SH) || defined(IA64) tprintf("[%lu, %lu]", tcp->u_rval, getrval2(tcp)); #else tprintf("%#lx", tcp->u_arg[0]); |