From c43352ccfa1ebeb15da26e52bcb152f614cbfe0a Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 4 Aug 2005 01:09:44 +0200 Subject: Fix endianess problem in TFTP / NFS default filenames Patch by Hiroshi Ito, 06 Dec 2004 --- net/tftp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'net/tftp.c') diff --git a/net/tftp.c b/net/tftp.c index 5a5ae22ac8..64a5576663 100644 --- a/net/tftp.c +++ b/net/tftp.c @@ -302,13 +302,11 @@ void TftpStart (void) { if (BootFile[0] == '\0') { - IPaddr_t OurIP = ntohl(NetOurIP); - sprintf(default_filename, "%02lX%02lX%02lX%02lX.img", - OurIP & 0xFF, - (OurIP >> 8) & 0xFF, - (OurIP >> 16) & 0xFF, - (OurIP >> 24) & 0xFF ); + NetOurIP & 0xFF, + (NetOurIP >> 8) & 0xFF, + (NetOurIP >> 16) & 0xFF, + (NetOurIP >> 24) & 0xFF ); tftp_filename = default_filename; printf ("*** Warning: no boot file name; using '%s'\n", -- cgit