diff options
author | Joe Perches <joe@perches.com> | 2010-03-08 15:15:28 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-03-08 15:15:28 -0500 |
commit | fc0b579168cbe737c83c6b9bbfe265d3ae6baca6 (patch) | |
tree | a9818961a11c7322cb585b03859ebf497e8db62f /net/sunrpc/xprtsock.c | |
parent | e9dcd1613f0ac0b3573b7d813a2c5672cd8302eb (diff) |
net/sunrpc: Remove uses of NIPQUAD, use %pI4
Originally submitted Jan 1, 2010
http://patchwork.kernel.org/patch/71221/
Convert NIPQUAD to the %pI4 format extension where possible
Convert %02x%02x%02x%02x/NIPQUAD to %08x/ntohl
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 3d739e5d15d8..86234bcf2e89 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -297,12 +297,11 @@ static void xs_format_common_peer_addresses(struct rpc_xprt *xprt) | |||
297 | switch (sap->sa_family) { | 297 | switch (sap->sa_family) { |
298 | case AF_INET: | 298 | case AF_INET: |
299 | sin = xs_addr_in(xprt); | 299 | sin = xs_addr_in(xprt); |
300 | (void)snprintf(buf, sizeof(buf), "%02x%02x%02x%02x", | 300 | snprintf(buf, sizeof(buf), "%08x", ntohl(sin->sin_addr.s_addr)); |
301 | NIPQUAD(sin->sin_addr.s_addr)); | ||
302 | break; | 301 | break; |
303 | case AF_INET6: | 302 | case AF_INET6: |
304 | sin6 = xs_addr_in6(xprt); | 303 | sin6 = xs_addr_in6(xprt); |
305 | (void)snprintf(buf, sizeof(buf), "%pi6", &sin6->sin6_addr); | 304 | snprintf(buf, sizeof(buf), "%pi6", &sin6->sin6_addr); |
306 | break; | 305 | break; |
307 | default: | 306 | default: |
308 | BUG(); | 307 | BUG(); |