mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
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>
This commit is contained in:
committed by
Wolfgang Denk
parent
7f79c6f2f4
commit
ea45cb0adc
@@ -708,7 +708,7 @@ void TftpStart(enum proto_t protocol)
|
||||
|
||||
TftpRemoteIP = NetServerIP;
|
||||
if (BootFile[0] == '\0') {
|
||||
sprintf(default_filename, "%02lX%02lX%02lX%02lX.img",
|
||||
sprintf(default_filename, "%02X%02X%02X%02X.img",
|
||||
NetOurIP & 0xFF,
|
||||
(NetOurIP >> 8) & 0xFF,
|
||||
(NetOurIP >> 16) & 0xFF,
|
||||
|
Reference in New Issue
Block a user