aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Wu <josh.wu@atmel.com>2015-09-01 18:22:55 +0800
committerJoe Hershberger <joe.hershberger@ni.com>2015-10-28 15:01:10 -0500
commit219cc94a3f3440ea9c5a29d6b114b371a6aec430 (patch)
tree3cd5c99cfc33f9122c70f9411b7d493a97fa1584
parent7aba0f2c2ce80406661ea2dc79ea1892cc93a26f (diff)
downloadu-boot-219cc94a3f3440ea9c5a29d6b114b371a6aec430.zip
u-boot-219cc94a3f3440ea9c5a29d6b114b371a6aec430.tar.gz
u-boot-219cc94a3f3440ea9c5a29d6b114b371a6aec430.tar.bz2
net: change the env name to use const
As we don't modify the 'name' parameter, so change it to const. Signed-off-by: Josh Wu <josh.wu@atmel.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--include/net.h4
-rw-r--r--net/eth.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/include/net.h b/include/net.h
index 3a787cc..1aabd74 100644
--- a/include/net.h
+++ b/include/net.h
@@ -233,8 +233,8 @@ void eth_set_current(void); /* set nterface to ethcur var */
int eth_get_dev_index(void); /* get the device index */
void eth_parse_enetaddr(const char *addr, uchar *enetaddr);
-int eth_getenv_enetaddr(char *name, uchar *enetaddr);
-int eth_setenv_enetaddr(char *name, const uchar *enetaddr);
+int eth_getenv_enetaddr(const char *name, uchar *enetaddr);
+int eth_setenv_enetaddr(const char *name, const uchar *enetaddr);
/*
* Get the hardware address for an ethernet interface .
diff --git a/net/eth.c b/net/eth.c
index e9b22d8..b978aae 100644
--- a/net/eth.c
+++ b/net/eth.c
@@ -31,13 +31,13 @@ void eth_parse_enetaddr(const char *addr, uchar *enetaddr)
}
}
-int eth_getenv_enetaddr(char *name, uchar *enetaddr)
+int eth_getenv_enetaddr(const char *name, uchar *enetaddr)
{
eth_parse_enetaddr(getenv(name), enetaddr);
return is_valid_ethaddr(enetaddr);
}
-int eth_setenv_enetaddr(char *name, const uchar *enetaddr)
+int eth_setenv_enetaddr(const char *name, const uchar *enetaddr)
{
char buf[20];