[PATCH 8/8] net: remove unused getenv_ip_dns

Sascha Hauer s.hauer at pengutronix.de
Sun Apr 15 10:28:31 EDT 2012


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 include/net.h |    6 +-----
 net/net.c     |    5 +----
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/include/net.h b/include/net.h
index 01e4b22..25d7b6e 100644
--- a/include/net.h
+++ b/include/net.h
@@ -279,11 +279,7 @@ char *ip_to_string (IPaddr_t x);
 /* Convert a string to ip address */
 int string_to_ip(const char *s, IPaddr_t *ip);
 
-IPaddr_t getenv_ip_dns(const char *name, int dns);
-static inline IPaddr_t getenv_ip(const char *name)
-{
-	return getenv_ip_dns(name, 0);
-}
+IPaddr_t getenv_ip(const char *name);
 int setenv_ip(const char *name, IPaddr_t ip);
 
 int string_to_ethaddr(const char *str, char *enetaddr);
diff --git a/net/net.c b/net/net.c
index 6e2c14b..783f3d1 100644
--- a/net/net.c
+++ b/net/net.c
@@ -129,7 +129,7 @@ int string_to_ip(const char *s, IPaddr_t *ip)
 	return 0;
 }
 
-IPaddr_t getenv_ip_dns(const char *name, int dns)
+IPaddr_t getenv_ip(const char *name)
 {
 	IPaddr_t ip;
 	const char *var = getenv(name);
@@ -140,9 +140,6 @@ IPaddr_t getenv_ip_dns(const char *name, int dns)
 	if (!string_to_ip(var, &ip))
 		return ip;
 
-	if (!dns)
-		return 0;
-
 	return resolv((char*)var);
 }
 
-- 
1.7.10




More information about the barebox mailing list