misc: replace NIPQUAD()
Using NIPQUAD() with NIPQUAD_FMT, %d.%d.%d.%d or %u.%u.%u.%u can be replaced with %pI4 Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
be85940548
commit
3685f25de1
@@ -139,8 +139,8 @@ static inline char *__svc_print_addr(struct sockaddr *addr,
|
||||
{
|
||||
switch (addr->sa_family) {
|
||||
case AF_INET:
|
||||
snprintf(buf, len, "%u.%u.%u.%u, port=%u",
|
||||
NIPQUAD(((struct sockaddr_in *) addr)->sin_addr),
|
||||
snprintf(buf, len, "%pI4, port=%u",
|
||||
&((struct sockaddr_in *)addr)->sin_addr,
|
||||
ntohs(((struct sockaddr_in *) addr)->sin_port));
|
||||
break;
|
||||
|
||||
|
Reference in New Issue
Block a user