Commit ac78838b authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville

MIPS: BCM47XX: fix signature of nvram_parse_macaddr

Explicitly enforce an char array of 6 bytes for the mac address.
Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 44d4b2ae
...@@ -37,7 +37,7 @@ struct nvram_header { ...@@ -37,7 +37,7 @@ struct nvram_header {
extern int nvram_getenv(char *name, char *val, size_t val_len); extern int nvram_getenv(char *name, char *val, size_t val_len);
static inline void nvram_parse_macaddr(char *buf, u8 *macaddr) static inline void nvram_parse_macaddr(char *buf, u8 macaddr[6])
{ {
if (strchr(buf, ':')) if (strchr(buf, ':'))
sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0], sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0],
......
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