summaryrefslogtreecommitdiffstats
path: root/net/net.c
diff options
context:
space:
mode:
authorMatthias Weisser <weisserm@arcor.de>2011-12-03 03:29:44 +0000
committerWolfgang Denk <wd@denx.de>2011-12-06 22:15:32 +0100
commitea45cb0adcf4baa8f939fea4c848f3e1906f19d9 (patch)
treed7aefd5f7baa6fcc46c7ac046a133c5d44ee7f78 /net/net.c
parent7f79c6f2f447fbac1a78d76912ba53afce598ce6 (diff)
downloadblackbird-obmc-uboot-ea45cb0adcf4baa8f939fea4c848f3e1906f19d9.tar.gz
blackbird-obmc-uboot-ea45cb0adcf4baa8f939fea4c848f3e1906f19d9.zip
net: Make sure IPaddr_t is 32 bits in size
When building u-boot as 64 bit application (e.g. sandbox) ulong might be 64 bits in size. This breaks network code as IPaddr_t is 64 bytes in size then and an IPv4 address is 32 bits in size. This patch makes sure that IPaddr_t is always 32 bits in size. Also some warnings introduced by this patch are fixed. Signed-off-by: Matthias Weisser <weisserm@arcor.de> Acked-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'net/net.c')
-rw-r--r--net/net.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/net.c b/net/net.c
index d0fe1c4960..045405b7a8 100644
--- a/net/net.c
+++ b/net/net.c
@@ -728,7 +728,7 @@ NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len)
*/
if (memcmp(ether, NetEtherNullAddr, 6) == 0) {
- debug("sending ARP for %08lx\n", dest);
+ debug("sending ARP for %08x\n", dest);
NetArpWaitPacketIP = dest;
NetArpWaitPacketMAC = ether;
@@ -751,7 +751,7 @@ NetSendUDPPacket(uchar *ether, IPaddr_t dest, int dport, int sport, int len)
return 1; /* waiting */
}
- debug("sending UDP to %08lx/%pM\n", dest, ether);
+ debug("sending UDP to %08x/%pM\n", dest, ether);
pkt = (uchar *)NetTxPacket;
pkt += NetSetEther(pkt, ether, PROT_IP);
@@ -775,7 +775,7 @@ int PingSend(void)
memcpy(mac, NetEtherNullAddr, 6);
- debug("sending ARP for %08lx\n", NetPingIP);
+ debug("sending ARP for %08x\n", NetPingIP);
NetArpWaitPacketIP = NetPingIP;
NetArpWaitPacketMAC = mac;
OpenPOWER on IntegriCloud