net: change the env name to use const
PATCH 1/1 net: change the env name to use const
As we don't modify the 'name' parameter, so change it to const.
---
include/net.h | 4 ++-- net/eth.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-)
include/net.h +2 -2
@@ -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 .
net/eth.c +2 -2
@@ -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 ];
Signature · 1 line
1.9.1
PATCH 1/1 net: change the env name to use const
Quoted 8 lines · Josh Wu
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by Josh Wu <[email protected]>---
include/net.h| 4 ++--net/eth.c| 4 ++--2 files changed, 4 insertions(+), 4 deletions(-)
PATCH 1/1 net: change the env name to use const
In reply to Josh WuQuoted 3 lines · Josh Wu
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by Josh Wu <[email protected]>
PATCH 1/1 net: change the env name to use const
Hi, Joe
Quoted 5 lines · Joe Hershberger
Quoted 3 lines · Josh Wu
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by Josh Wu <[email protected]>Acked-by Joe Hershberger <[email protected]>
Thanks for the Ack.
It seems I didn't see this patch in your git tree, or I missed something?
Best Regards,
Josh Wu
PATCH 1/1 net: change the env name to use const
In reply to Josh WuQuoted 3 lines · Josh Wu
As we don't modify the 'name' parameter, so change it to const.
Signed-off-by Josh Wu <[email protected]>
Applied to u-boot-net/master, thanks!
-Joe