提交 05f147ef 编写于 作者: D Daniel Borkmann 提交者: David S. Miller

net: sctp_probe: simplify code by using %pISc format specifier

We can simply use the %pISc format specifier that was recently added
and thus remove some code that distinguishes between IPv4 and IPv6.
Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
Acked-by: NNeil Horman <nhorman@tuxdriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 5b5fde7f
...@@ -155,13 +155,8 @@ static sctp_disposition_t jsctp_sf_eat_sack(struct net *net, ...@@ -155,13 +155,8 @@ static sctp_disposition_t jsctp_sf_eat_sack(struct net *net,
if (sp == asoc->peer.primary_path) if (sp == asoc->peer.primary_path)
printl("*"); printl("*");
if (sp->ipaddr.sa.sa_family == AF_INET) printl("%pISc %2u %8u %8u %8u %8u %8u ",
printl("%pI4 ", &sp->ipaddr.v4.sin_addr); &sp->ipaddr, sp->state, sp->cwnd, sp->ssthresh,
else
printl("%pI6 ", &sp->ipaddr.v6.sin6_addr);
printl("%2u %8u %8u %8u %8u %8u ",
sp->state, sp->cwnd, sp->ssthresh,
sp->flight_size, sp->partial_bytes_acked, sp->flight_size, sp->partial_bytes_acked,
sp->pathmtu); sp->pathmtu);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册