Skip to content

Commit

Permalink
[SCSI] iscsi: simplify IPv6 and IPv4 address printing
Browse files Browse the repository at this point in the history
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Jan 6, 2007
1 parent 0949260 commit 94cb3f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/scsi/iscsi_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2044,13 +2044,11 @@ iscsi_tcp_conn_get_param(struct iscsi_cls_conn *cls_conn,
sk = tcp_conn->sock->sk;
if (sk->sk_family == PF_INET) {
inet = inet_sk(sk);
len = sprintf(buf, "%u.%u.%u.%u\n",
len = sprintf(buf, NIPQUAD_FMT "\n",
NIPQUAD(inet->daddr));
} else {
np = inet6_sk(sk);
len = sprintf(buf,
"%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
NIP6(np->daddr));
len = sprintf(buf, NIP6_FMT "\n", NIP6(np->daddr));
}
mutex_unlock(&conn->xmitmutex);
break;
Expand Down

0 comments on commit 94cb3f8

Please sign in to comment.