projects
/
deliverable
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b595bb1
)
SUNRPC: Use standard macros for printing IP addresses
author
Chuck Lever
<chuck.lever@oracle.com>
Mon, 6 Aug 2007 15:56:52 +0000
(11:56 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Tue, 9 Oct 2007 21:15:46 +0000
(17:15 -0400)
include/linux/kernel.h gives us some nice macros for formatting IP
addresses. Use them.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
net/sunrpc/xprtsock.c
patch
|
blob
|
blame
|
history
diff --git
a/net/sunrpc/xprtsock.c
b/net/sunrpc/xprtsock.c
index 56b226797ae38cf9831fe7d7d5251207dfd81507..015f29edb619a8f381d0a8b1e9221bccb6cd21f3 100644
(file)
--- a/
net/sunrpc/xprtsock.c
+++ b/
net/sunrpc/xprtsock.c
@@
-267,7
+267,7
@@
static void xs_format_peer_addresses(struct rpc_xprt *xprt)
buf = kzalloc(20, GFP_KERNEL);
if (buf) {
- snprintf(buf, 20,
"%u.%u.%u.%u"
,
+ snprintf(buf, 20,
NIPQUAD_FMT
,
NIPQUAD(addr->sin_addr.s_addr));
}
xprt->address_strings[RPC_DISPLAY_ADDR] = buf;
@@
-286,7
+286,7
@@
static void xs_format_peer_addresses(struct rpc_xprt *xprt)
buf = kzalloc(48, GFP_KERNEL);
if (buf) {
- snprintf(buf, 48, "addr=
%u.%u.%u.%u
port=%u proto=%s",
+ snprintf(buf, 48, "addr=
"NIPQUAD_FMT"
port=%u proto=%s",
NIPQUAD(addr->sin_addr.s_addr),
ntohs(addr->sin_port),
xprt->prot == IPPROTO_UDP ? "udp" : "tcp");
This page took
0.025486 seconds
and
5
git commands to generate.