[NET]: Introduce and use print_mac() and DECLARE_MAC_BUF()
[deliverable/linux.git] / net / tipc / eth_media.c
index d6fc0575816bd4a994ac70bd715487a7e3c3f397..1a99e294714508de2693d381b9de60eb8388b53e 100644 (file)
@@ -243,12 +243,12 @@ static int recv_notification(struct notifier_block *nb, unsigned long evt,
 static char *eth_addr2str(struct tipc_media_addr *a, char *str_buf, int str_size)
 {
        unchar *addr = (unchar *)&a->dev_addr;
+       DECLARE_MAC_BUF(mac);
 
        if (str_size < 18)
                *str_buf = '\0';
        else
-               sprintf(str_buf, "%02x:%02x:%02x:%02x:%02x:%02x",
-                       addr[0], addr[1], addr[2], addr[3], addr[4], addr[5]);
+               sprintf(str_buf, "%s", print_mac(mac, addr));
        return str_buf;
 }
 
This page took 0.026023 seconds and 5 git commands to generate.