summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-12-11 15:41:46 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-12-14 11:40:50 +0100
commit39698df6f7623fca8f6bdb500625e8da2fcd54f5 (patch)
tree3a470b3ceb23c4eecdeb0cdd5faee32d82bd87e1 /include
parent7065fa32cac8af222bffc2ce9256931beaa2acfc (diff)
downloadbarebox-39698df6f7623fca8f6bdb500625e8da2fcd54f5.tar.gz
barebox-39698df6f7623fca8f6bdb500625e8da2fcd54f5.tar.xz
net: resolv: Make argument const
resolv() is not allowed to change the hostname argument, make it const. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/net.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net.h b/include/net.h
index 2a37a43a5c..13e335aac2 100644
--- a/include/net.h
+++ b/include/net.h
@@ -315,9 +315,9 @@ int string_to_ethaddr(const char *str, u8 enetaddr[6]);
void ethaddr_to_string(const u8 enetaddr[6], char *str);
#ifdef CONFIG_NET_RESOLV
-IPaddr_t resolv(char *host);
+IPaddr_t resolv(const char *host);
#else
-static inline IPaddr_t resolv(char *host)
+static inline IPaddr_t resolv(const char *host)
{
IPaddr_t ip = 0;
string_to_ip(host, &ip);