public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] net: change the env name to use const
@ 2015-09-01 10:22 Josh Wu
  2015-09-02  2:33 ` Simon Glass
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Josh Wu @ 2015-09-01 10:22 UTC (permalink / raw)
  To: u-boot

As we don't modify the 'name' parameter, so change it to const.

Signed-off-by: Josh Wu <josh.wu@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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-10-29 19:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-01 10:22 [U-Boot] [PATCH] net: change the env name to use const Josh Wu
2015-09-02  2:33 ` Simon Glass
2015-09-04 15:34 ` Joe Hershberger
2015-10-16  3:19   ` Josh Wu
2015-10-29 19:31 ` Joe Hershberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox