Commit 963a9fd2 authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

qeth: Use %pI6

Format an ipv6 address using vsprintf extensions.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d36deae7
...@@ -103,12 +103,7 @@ int qeth_l3_string_to_ipaddr4(const char *buf, __u8 *addr) ...@@ -103,12 +103,7 @@ int qeth_l3_string_to_ipaddr4(const char *buf, __u8 *addr)
void qeth_l3_ipaddr6_to_string(const __u8 *addr, char *buf) void qeth_l3_ipaddr6_to_string(const __u8 *addr, char *buf)
{ {
sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x" sprintf(buf, "%pI6", addr);
":%02x%02x:%02x%02x:%02x%02x:%02x%02x",
addr[0], addr[1], addr[2], addr[3],
addr[4], addr[5], addr[6], addr[7],
addr[8], addr[9], addr[10], addr[11],
addr[12], addr[13], addr[14], addr[15]);
} }
int qeth_l3_string_to_ipaddr6(const char *buf, __u8 *addr) int qeth_l3_string_to_ipaddr6(const char *buf, __u8 *addr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment