summaryrefslogtreecommitdiffstats
path: root/net/lib.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-09-15 12:51:27 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-09-22 11:30:38 +0200
commitd60230bded854fe5a357c77038cf6089defcfd24 (patch)
tree6c8b3dc4dee496cda1e1f9da5f53b1fa58a2e5ef /net/lib.c
parent581272f8c59a71e8f64a15b6b33bb0d1fc5ac6ba (diff)
downloadbarebox-d60230bded854fe5a357c77038cf6089defcfd24.tar.gz
barebox-d60230bded854fe5a357c77038cf6089defcfd24.tar.xz
convert users to %pI4
Convert users of ip_to_string() and print_IPaddr() to %pI4 and remove the now unused functions. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'net/lib.c')
-rw-r--r--net/lib.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/net/lib.c b/net/lib.c
index f1c60c9a74..d4343bcedd 100644
--- a/net/lib.c
+++ b/net/lib.c
@@ -57,25 +57,6 @@ void ethaddr_to_string(const u8 enetaddr[6], char *str)
enetaddr[4], enetaddr[5]);
}
-void print_IPaddr(IPaddr_t x)
-{
- puts(ip_to_string(x));
-}
-
-char *ip_to_string(IPaddr_t x)
-{
- static char s[sizeof("xxx.xxx.xxx.xxx")];
-
- x = ntohl(x);
- sprintf(s, "%d.%d.%d.%d",
- (int) ((x >> 24) & 0xff),
- (int) ((x >> 16) & 0xff),
- (int) ((x >> 8) & 0xff), (int) ((x >> 0) & 0xff)
- );
-
- return s;
-}
-
int string_to_ip(const char *s, IPaddr_t *ip)
{
IPaddr_t addr = 0;