[U-Boot] [PATCH] net: change the env name to use const
Josh Wu
josh.wu at atmel.com
Tue Sep 1 12:22:55 CEST 2015
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by: Josh Wu <josh.wu at atmel.com>
---
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 d09bec9..133fee4 100644
--- a/include/net.h
+++ b/include/net.h
@@ -229,8 +229,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 d3ec8d6..8e146d2 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];
--
1.9.1
More information about the U-Boot
mailing list