Skip to content

Commit

Permalink
MIPS: BCM47XX: fix signature of nvram_parse_macaddr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hauke Mehrtens authored and John W. Linville committed Mar 5, 2012
1 parent 44d4b2a commit ac78838
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/mips/include/asm/mach-bcm47xx/nvram.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ struct nvram_header {

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, ':'))
sscanf(buf, "%hhx:%hhx:%hhx:%hhx:%hhx:%hhx", &macaddr[0],
Expand Down

0 comments on commit ac78838

Please sign in to comment.