summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Mtftp4Dxe
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-11-01 03:55:20 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2012-11-01 03:55:20 +0000
commit16cd325fc1d7b8f9e668ee8f12fced2b643f1b01 (patch)
tree8f4983fdb5294b7c8b00c1808101ffdec29780a3 /MdeModulePkg/Universal/Network/Mtftp4Dxe
parenta56b6e03e22c4023fdf5b026b0fcb096d6a0f677 (diff)
downloadedk2-16cd325fc1d7b8f9e668ee8f12fced2b643f1b01.zip
edk2-16cd325fc1d7b8f9e668ee8f12fced2b643f1b01.tar.gz
edk2-16cd325fc1d7b8f9e668ee8f12fced2b643f1b01.tar.bz2
Fix build fail.
Signed-off-by: Eric Dong <eric.dong@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13907 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Mtftp4Dxe')
-rw-r--r--MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
index 90207a2..df79c85 100644
--- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
+++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
@@ -443,7 +443,7 @@ Mtftp4SendPacket (
UDP_END_POINT UdpPoint;
EFI_STATUS Status;
UINT16 OpCode;
- UINT16 Value;
+ UINT8 *Buffer;
//
// Save the packet for retransmission
@@ -464,9 +464,9 @@ Mtftp4SendPacket (
// 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 @@ Mtftp4Retransmit (
UDP_END_POINT UdpPoint;
EFI_STATUS Status;
UINT16 OpCode;
- UINT16 Value;
+ UINT8 *Buffer;
ASSERT (Instance->LastPacket != NULL);
@@ -522,9 +522,9 @@ Mtftp4Retransmit (
//
// 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)) {