]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c
Fixed GCC 4.4 build issues due to EFIAPI not being used when required.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Support.c
index 5c8516f6307496fb60dabb078beaeb3ded02cbb2..e7f6291e035c99e34329c8dc16c688b8f30a472e 100644 (file)
@@ -139,7 +139,7 @@ Mtftp4SetLastBlockNum (
 \r
     if (Range->Start > Last) {\r
       RemoveEntryList (&Range->Link);\r
-      gBS->FreePool (Range);\r
+      FreePool (Range);\r
       continue;\r
     }\r
 \r
@@ -209,7 +209,7 @@ Mtftp4RemoveBlockNum (
 \r
       if (Range->Start > Range->End) {\r
         RemoveEntryList (&Range->Link);\r
-        gBS->FreePool (Range);\r
+        FreePool (Range);\r
       }\r
 \r
       return EFI_SUCCESS;\r
@@ -359,15 +359,16 @@ Mtftp4SendError (
   It simply frees the packet.\r
 \r
   @param  Packet                The transmitted (or failed to) packet\r
-  @param  Points                The local and remote UDP access point\r
+  @param  EndPoint              The local and remote UDP access point\r
   @param  IoStatus              The result of the transmission\r
   @param  Context               Opaque parameter to the callback\r
 \r
 **/\r
 VOID\r
+EFIAPI\r
 Mtftp4OnPacketSent (\r
   IN NET_BUF                   *Packet,\r
-  IN UDP_POINTS                *Points,\r
+  IN UDP_END_POINT             *EndPoint,\r
   IN EFI_STATUS                IoStatus,\r
   IN VOID                      *Context\r
   )\r
@@ -415,7 +416,7 @@ Mtftp4SendPacket (
   IN OUT NET_BUF                *Packet\r
   )\r
 {\r
-  UDP_POINTS                UdpPoint;\r
+  UDP_END_POINT             UdpPoint;\r
   EFI_STATUS                Status;\r
   UINT16                    OpCode;\r
   UINT16                    Value;\r
@@ -427,14 +428,13 @@ Mtftp4SendPacket (
     NetbufFree (Instance->LastPacket);\r
   }\r
 \r
-  Instance->LastPacket  = Packet;\r
+  Instance->LastPacket        = Packet;\r
 \r
-  Instance->CurRetry    = 0;\r
+  Instance->CurRetry          = 0;\r
   Mtftp4SetTimeout (Instance);\r
 \r
-  UdpPoint.LocalAddr    = 0;\r
-  UdpPoint.LocalPort    = 0;\r
-  UdpPoint.RemoteAddr   = Instance->ServerIp;\r
+  ZeroMem (&UdpPoint, sizeof (UdpPoint));\r
+  UdpPoint.RemoteAddr.Addr[0] = Instance->ServerIp;\r
 \r
   //\r
   // Send the requests to the listening port, other packets\r
@@ -457,7 +457,7 @@ Mtftp4SendPacket (
              Instance->UnicastPort,\r
              Packet,\r
              &UdpPoint,\r
-             0,\r
+             NULL,\r
              Mtftp4OnPacketSent,\r
              Instance\r
              );\r
@@ -484,16 +484,15 @@ Mtftp4Retransmit (
   IN MTFTP4_PROTOCOL        *Instance\r
   )\r
 {\r
-  UDP_POINTS                UdpPoint;\r
+  UDP_END_POINT             UdpPoint;\r
   EFI_STATUS                Status;\r
   UINT16                    OpCode;\r
   UINT16                    Value;\r
 \r
   ASSERT (Instance->LastPacket != NULL);\r
 \r
-  UdpPoint.LocalAddr  = 0;\r
-  UdpPoint.LocalPort  = 0;\r
-  UdpPoint.RemoteAddr = Instance->ServerIp;\r
+  ZeroMem (&UdpPoint, sizeof (UdpPoint));\r
+  UdpPoint.RemoteAddr.Addr[0] = Instance->ServerIp;\r
 \r
   //\r
   // Set the requests to the listening port, other packets to the connected port\r
@@ -514,7 +513,7 @@ Mtftp4Retransmit (
              Instance->UnicastPort,\r
              Instance->LastPacket,\r
              &UdpPoint,\r
-             0,\r
+             NULL,\r
              Mtftp4OnPacketSent,\r
              Instance\r
              );\r