mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-16 19:45:07 +00:00
MIPS: BCM47XX: fix signature of nvram_parse_macaddr
Explicitly enforce an char array of 6 bytes for the mac address. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
44d4b2ae94
commit
ac78838b65
1 changed files with 1 additions and 1 deletions
|
@ -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],
|
||||||
|
|
Loading…
Add table
Reference in a new issue