mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
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>
This commit is contained in:
parent
6c6166f529
commit
b6446b6775
6 changed files with 33 additions and 69 deletions
13
net/net.c
13
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)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue