Skip to content

Commit

Permalink
qeth: Use %pI6
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joe Perches authored and David S. Miller committed Sep 8, 2010
1 parent d36deae commit 963a9fd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions drivers/s390/net/qeth_l3_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
sprintf(buf, "%02x%02x:%02x%02x:%02x%02x:%02x%02x"
":%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]);
sprintf(buf, "%pI6", addr);
}

int qeth_l3_string_to_ipaddr6(const char *buf, __u8 *addr)
Expand Down

0 comments on commit 963a9fd

Please sign in to comment.