summaryrefslogtreecommitdiff
path: root/net/net.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-02-17 00:00:53 -0500
committerWolfgang Denk <wd@denx.de>2009-03-20 22:39:09 +0100
commitb6446b67758ea1e41223f0782924bb73fd0a89d0 (patch)
tree6d96ce0bb34d3be4f09de423721095c1c6b8b1aa /net/net.c
parent6c6166f52983dac775e3852f9d0f49d033f27108 (diff)
downloadu-boot-imx-b6446b67758ea1e41223f0782924bb73fd0a89d0.zip
u-boot-imx-b6446b67758ea1e41223f0782924bb73fd0a89d0.tar.gz
u-boot-imx-b6446b67758ea1e41223f0782924bb73fd0a89d0.tar.bz2
convert print_IPaddr() to %pI4
Now that our printf functions support the %pI4 modifier like the kernel, let's drop the inflexible print_IPaddr() function and covert over to the %pI4 modifier. Signed-off-by: Mike Frysinger <vapier@gentoo.org> CC: Ben Warren <biggerbadderben@gmail.com>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/net/net.c b/net/net.c
index a55f4d3..da3f4cd 100644
--- a/net/net.c
+++ b/net/net.c
@@ -1461,9 +1461,7 @@ NetReceive(volatile uchar * inpkt, int len)
case ICMP_REDIRECT:
if (icmph->code != ICMP_REDIR_HOST)
return;
- puts (" ICMP Host Redirect to ");
- print_IPaddr(icmph->un.gateway);
- putc(' ');
+ printf (" ICMP Host Redirect to %pI4 ", &icmph->un.gateway);
return;
#if defined(CONFIG_CMD_PING)
case ICMP_ECHO_REPLY:
@@ -1805,15 +1803,6 @@ ushort string_to_VLAN(char *s)
return htons(id);
}
-void print_IPaddr (IPaddr_t x)
-{
- char tmp[16];
-
- ip_to_string (x, tmp);
-
- puts (tmp);
-}
-
IPaddr_t getenv_IPaddr (char *var)
{
return (string_to_ip(getenv(var)));