diff options
author | oliver@schinagl.nl <oliver@schinagl.nl> | 2016-11-25 16:30:20 +0100 |
---|---|---|
committer | Joe Hershberger <joe.hershberger@ni.com> | 2017-02-07 10:54:32 -0600 |
commit | 9f455bcb34fcab31b0eb8eec5702105c8d4bde18 (patch) | |
tree | 9d69ec52062805b09896a80088d121cb58dde93c /net | |
parent | a40db6d511712f53b6663e61786a9eb825589984 (diff) | |
download | u-boot-imx-9f455bcb34fcab31b0eb8eec5702105c8d4bde18.zip u-boot-imx-9f455bcb34fcab31b0eb8eec5702105c8d4bde18.tar.gz u-boot-imx-9f455bcb34fcab31b0eb8eec5702105c8d4bde18.tar.bz2 |
net: cosmetic: Make the MAC address string less magical
In u-boot printf has been extended with the %pM formatter to allow
printing of MAC addresses. However buffers that want to store a MAC
address cannot safely get the size. Add a define for this case so the
string of a MAC address can be reliably obtained.
Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/eth_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/eth_common.c b/net/eth_common.c index 2880901..e9d3c66 100644 --- a/net/eth_common.c +++ b/net/eth_common.c @@ -32,7 +32,7 @@ int eth_getenv_enetaddr(const char *name, uchar *enetaddr) int eth_setenv_enetaddr(const char *name, const uchar *enetaddr) { - char buf[20]; + char buf[ARP_HLEN_ASCII + 1]; sprintf(buf, "%pM", enetaddr); |