diff options
author | Joe Perches <joe@perches.com> | 2010-09-07 17:14:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-09-08 17:31:01 -0400 |
commit | 963a9fd22d7e5b50806f619ef8d047fd9398f105 (patch) | |
tree | 0357d2c28b320ee1f8554132c03632a9686dce98 | |
parent | d36deae75011a7890f0e730dd0f867c64081cb50 (diff) |
qeth: Use %pI6
Format an ipv6 address using vsprintf extensions.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/s390/net/qeth_l3_main.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c index e22ae248f61..561bdc881e9 100644 --- a/drivers/s390/net/qeth_l3_main.c +++ b/drivers/s390/net/qeth_l3_main.c | |||
@@ -103,12 +103,7 @@ int qeth_l3_string_to_ipaddr4(const char *buf, __u8 *addr) | |||
103 | 103 | ||
104 | void qeth_l3_ipaddr6_to_string(const __u8 *addr, char *buf) | 104 | void qeth_l3_ipaddr6_to_string(const __u8 *addr, char *buf) |
105 | { | 105 | { |
106 | sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x" | 106 | sprintf(buf, "%pI6", addr); |
107 | ":%02x%02x:%02x%02x:%02x%02x:%02x%02x", | ||
108 | addr[0], addr[1], addr[2], addr[3], | ||
109 | addr[4], addr[5], addr[6], addr[7], | ||
110 | addr[8], addr[9], addr[10], addr[11], | ||
111 | addr[12], addr[13], addr[14], addr[15]); | ||
112 | } | 107 | } |
113 | 108 | ||
114 | int qeth_l3_string_to_ipaddr6(const char *buf, __u8 *addr) | 109 | int qeth_l3_string_to_ipaddr6(const char *buf, __u8 *addr) |