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>
This commit is contained in:
Josh Wu 2015-09-01 18:22:55 +08:00 committed by Joe Hershberger
parent 7aba0f2c2c
commit 219cc94a3f
2 changed files with 4 additions and 4 deletions

View File

@ -233,8 +233,8 @@ void eth_set_current(void); /* set nterface to ethcur var */
int eth_get_dev_index(void); /* get the device index */ int eth_get_dev_index(void); /* get the device index */
void eth_parse_enetaddr(const char *addr, uchar *enetaddr); 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);
int eth_setenv_enetaddr(char *name, const uchar *enetaddr); int eth_setenv_enetaddr(const char *name, const uchar *enetaddr);
/* /*
* Get the hardware address for an ethernet interface . * Get the hardware address for an ethernet interface .

View File

@ -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); eth_parse_enetaddr(getenv(name), enetaddr);
return is_valid_ethaddr(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]; char buf[20];