diff mbox

[PATCHv2,03/10] staging: brcm80211: use '%pM' format to print MAC address

Message ID a017eca40cf5334b6c38a06c0cf9a831fee0e88d.1284316738.git.andy.shevchenko@gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Andy Shevchenko Sept. 13, 2010, 8:40 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/staging/brcm80211/util/bcmutils.c b/drivers/staging/brcm80211/util/bcmutils.c
index 364f837..c6c63a8 100644
--- a/drivers/staging/brcm80211/util/bcmutils.c
+++ b/drivers/staging/brcm80211/util/bcmutils.c
@@ -792,10 +792,7 @@  int BCMROMFN(bcm_ether_atoe) (char *p, struct ether_addr * ea) {
 
 char *bcm_ether_ntoa(const struct ether_addr *ea, char *buf)
 {
-	static const char template[] = "%02x:%02x:%02x:%02x:%02x:%02x";
-	snprintf(buf, 18, template,
-		 ea->octet[0] & 0xff, ea->octet[1] & 0xff, ea->octet[2] & 0xff,
-		 ea->octet[3] & 0xff, ea->octet[4] & 0xff, ea->octet[5] & 0xff);
+	snprintf(buf, 18, "%pM", ea->octet);
 	return (buf);
 }