1
0
mirror of https://github.com/freifunk-gluon/packages.git synced 2024-06-17 12:44:00 +02:00

respondd-module-wifi: replace mac_addr_n2a implementation

This commit is contained in:
Martin/Geno 2018-09-25 21:48:47 +02:00
parent 0376376945
commit f70362677f
No known key found for this signature in database
GPG Key ID: 9D7D3C6BFF600C6A

View File

@ -9,18 +9,7 @@
void mac_addr_n2a(char *mac_addr, unsigned char *arg) {
int i, l;
l = 0;
for (i = 0; i < ETH_ALEN ; i++) {
if (i == 0) {
sprintf(mac_addr+l, "%02x", arg[i]);
l += 2;
} else {
sprintf(mac_addr+l, ":%02x", arg[i]);
l += 3;
}
}
sprintf(mac_addr, "%02x:%02x:%02x:%02x:%02x:%02x", arg[0], arg[1], arg[2], arg[3], arg[4], arg[5]);
}