Revision: 13907
          http://edk2.svn.sourceforge.net/edk2/?rev=13907&view=rev
Author:   ydong10
Date:     2012-11-01 03:55:20 +0000 (Thu, 01 Nov 2012)
Log Message:
-----------
Fix build fail.

Signed-off-by: Eric Dong <[email protected]>

Modified Paths:
--------------
    trunk/edk2/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c

Modified: trunk/edk2/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c 
2012-11-01 03:02:00 UTC (rev 13906)
+++ trunk/edk2/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c 
2012-11-01 03:55:20 UTC (rev 13907)
@@ -443,7 +443,7 @@
   UDP_END_POINT             UdpPoint;
   EFI_STATUS                Status;
   UINT16                    OpCode;
-  UINT16                    Value;
+  UINT8                     *Buffer;
 
   //
   // Save the packet for retransmission
@@ -464,9 +464,9 @@
   // Send the requests to the listening port, other packets
   // to the connected port
   //
-  Value = *((UINT16 *) NetbufGetByte (Packet, 0, NULL));
-  ASSERT (Value != NULL);
-  OpCode = NTOHS (Value);
+  Buffer = NetbufGetByte (Packet, 0, NULL);
+  ASSERT (Buffer != NULL);
+  OpCode = NTOHS (*(UINT16 *)Buffer);
 
   if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) || 
       (OpCode == EFI_MTFTP4_OPCODE_DIR) ||
@@ -512,7 +512,7 @@
   UDP_END_POINT             UdpPoint;
   EFI_STATUS                Status;
   UINT16                    OpCode;
-  UINT16                    Value;
+  UINT8                     *Buffer;
 
   ASSERT (Instance->LastPacket != NULL);
 
@@ -522,9 +522,9 @@
   //
   // Set the requests to the listening port, other packets to the connected 
port
   //
-  Value = *(UINT16 *) NetbufGetByte (Instance->LastPacket, 0, NULL);
-  ASSERT (Value != NULL);
-  OpCode = NTOHS (Value);
+  Buffer = NetbufGetByte (Instance->LastPacket, 0, NULL);
+  ASSERT (Buffer != NULL);
+  OpCode = NTOHS (*(UINT16 *) Buffer);
 
   if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) || (OpCode == EFI_MTFTP4_OPCODE_DIR) ||
       (OpCode == EFI_MTFTP4_OPCODE_WRQ)) {

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to