[SCSI] iscsi: simplify IPv6 and IPv4 address printing
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Sun, 17 Dec 2006 18:10:27 +0000 (12:10 -0600)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Sat, 6 Jan 2007 15:01:38 +0000 (09:01 -0600)
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>
drivers/scsi/iscsi_tcp.c

index 8889686314713d6bd16495adfdfd8b4b5be6bcf8..43768408437705fd81184e7be9e3a6a5d7bba0bb 100644 (file)
@@ -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;