diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-08-22 11:12:50 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-08-23 01:07:06 -0400 |
commit | 05f147ef7c5289e9aba488b3e71a4259be5a1420 (patch) | |
tree | 8fa5427bb1ba1c8f7404d6754bfdd4d8a1228981 /net/sctp | |
parent | 5b5fde7fdd39aeae627eb99be9bd80c18774a3bf (diff) |
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: Daniel Borkmann <dborkman@redhat.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/probe.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/net/sctp/probe.c b/net/sctp/probe.c index e62c22535be4..cd72ae57aff1 100644 --- a/net/sctp/probe.c +++ b/net/sctp/probe.c | |||
@@ -155,13 +155,8 @@ static sctp_disposition_t jsctp_sf_eat_sack(struct net *net, | |||
155 | if (sp == asoc->peer.primary_path) | 155 | if (sp == asoc->peer.primary_path) |
156 | printl("*"); | 156 | printl("*"); |
157 | 157 | ||
158 | if (sp->ipaddr.sa.sa_family == AF_INET) | 158 | printl("%pISc %2u %8u %8u %8u %8u %8u ", |
159 | printl("%pI4 ", &sp->ipaddr.v4.sin_addr); | 159 | &sp->ipaddr, sp->state, sp->cwnd, sp->ssthresh, |
160 | else | ||
161 | printl("%pI6 ", &sp->ipaddr.v6.sin6_addr); | ||
162 | |||
163 | printl("%2u %8u %8u %8u %8u %8u ", | ||
164 | sp->state, sp->cwnd, sp->ssthresh, | ||
165 | sp->flight_size, sp->partial_bytes_acked, | 160 | sp->flight_size, sp->partial_bytes_acked, |
166 | sp->pathmtu); | 161 | sp->pathmtu); |
167 | } | 162 | } |