From 219cc94a3f3440ea9c5a29d6b114b371a6aec430 Mon Sep 17 00:00:00 2001 From: Josh Wu Date: Tue, 1 Sep 2015 18:22:55 +0800 Subject: [PATCH] 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 Reviewed-by: Simon Glass Acked-by: Joe Hershberger --- include/net.h | 4 ++-- net/eth.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/net.h b/include/net.h index 3a787cc4e9..1aabd7438b 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 e9b22d823f..b978aae101 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]; -- 2.25.1