Skip to contentSkip to conversation

string_to_ip: constify "s" arg

PATCH New Mike Frysinger 2 participants 2 messages Oct 20, 2010 – Nov 28, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 string_to_ip: constify "s" arg

---
 include/net.h   |    2 +-
 lib/net_utils.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
include/net.h +1 -1
index 5e3495b..95ef8ab 100644
@@ -514,7 +514,7 @@ static inline int is_valid_ether_addr(const u8 *addr)
 extern void	ip_to_string (IPaddr_t x, char *s);
 
 /* Convert a string to ip address */
-extern IPaddr_t string_to_ip(char *s);
+extern IPaddr_t string_to_ip(const char *s);
 
 /* Convert a VLAN id to a string */
 extern void	VLAN_to_string (ushort x, char *s);
lib/net_utils.c +1 -1
index f03b098..b425a68 100644
@@ -28,7 +28,7 @@
 
 #include <common.h>
 
-IPaddr_t string_to_ip(char *s)
+IPaddr_t string_to_ip(const char *s)
 {
 	IPaddr_t addr;
 	char *e;
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 1/1 string_to_ip: constify "s" arg

Dear Mike Frysinger,

Quoted 5 lines · In message <[email protected]> you wrote:
---
 include/net.h   |    2 +-
 lib/net_utils.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Applied to "next" branch, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Of all possible committee reactions to any  given  agenda  item,  the
reaction  that will occur is the one which will liberate the greatest
amount of hot air.                                -- Thomas L. Martin