[U-Boot] [PATCH] string_to_ip: constify "s" arg
Mike Frysinger
vapier at gentoo.org
Wed Oct 20 13:16:58 CEST 2010
Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
include/net.h | 2 +-
lib/net_utils.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/net.h b/include/net.h
index 5e3495b..95ef8ab 100644
--- a/include/net.h
+++ b/include/net.h
@@ -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);
diff --git a/lib/net_utils.c b/lib/net_utils.c
index f03b098..b425a68 100644
--- a/lib/net_utils.c
+++ b/lib/net_utils.c
@@ -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;
--
1.7.3.1
More information about the U-Boot
mailing list