]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c
sync comments, fix function header, rename variable name to follow coding style.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Option.c
index b85784a926977a4f56ebee4a5a3bac6ec18fe690..6ae404b22a849b2cc4631395e6151538077e90b2 100644 (file)
@@ -21,7 +21,7 @@ Abstract:
 \r
 #include "Mtftp4Impl.h"\r
 \r
-UINT8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] = {\r
+CHAR8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] = {\r
   "blksize",\r
   "timeout",\r
   "tsize",\r
@@ -44,7 +44,6 @@ UINT8 *mMtftp4SupportedOptions[MTFTP4_SUPPORTED_OPTIONS] = {
   @retval EFI_SUCCESS            The packet has been parsed into the Options array.\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 Mtftp4FillOptions (\r
   IN  EFI_MTFTP4_PACKET     *Packet,\r
@@ -167,7 +166,7 @@ Mtftp4ExtractOptions (
     return EFI_SUCCESS;\r
   }\r
 \r
-  *OptionList = NetAllocatePool (*OptionCount * sizeof (EFI_MTFTP4_OPTION));\r
+  *OptionList = AllocatePool (*OptionCount * sizeof (EFI_MTFTP4_OPTION));\r
 \r
   if (*OptionList == NULL) {\r
     return EFI_OUT_OF_RESOURCES;\r
@@ -260,7 +259,6 @@ NetStringToU32 (
   @retval EFI_SUCCESS            The IP is parsed into the Ip\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 NetStringToIp (\r
   IN  UINT8                 *Str,\r
@@ -317,7 +315,6 @@ NetStringToIp (
   @retval EFI_SUCCESS            The multicast value is parsed into the Option\r
 \r
 **/\r
-STATIC\r
 EFI_STATUS\r
 Mtftp4ExtractMcast (\r
   IN UINT8                  *Value,\r
@@ -438,7 +435,7 @@ Mtftp4ParseOption (
       return EFI_INVALID_PARAMETER;\r
     }\r
 \r
-    if (NetStringEqualNoCase (This->OptionStr, "blksize")) {\r
+    if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "blksize")) {\r
       //\r
       // block size option, valid value is between [8, 65464]\r
       //\r
@@ -451,7 +448,7 @@ Mtftp4ParseOption (
       MtftpOption->BlkSize = (UINT16) Value;\r
       MtftpOption->Exist |= MTFTP4_BLKSIZE_EXIST;\r
 \r
-    } else if (NetStringEqualNoCase (This->OptionStr, "timeout")) {\r
+    } else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "timeout")) {\r
       //\r
       // timeout option, valid value is between [1, 255]\r
       //\r
@@ -463,14 +460,14 @@ Mtftp4ParseOption (
 \r
       MtftpOption->Timeout = (UINT8) Value;\r
 \r
-    } else if (NetStringEqualNoCase (This->OptionStr, "tsize")) {\r
+    } else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "tsize")) {\r
       //\r
       // tsize option, the biggest transfer supported is 4GB with block size option\r
       //\r
       MtftpOption->Tsize = NetStringToU32 (This->ValueStr);\r
       MtftpOption->Exist |= MTFTP4_TSIZE_EXIST;\r
 \r
-    } else if (NetStringEqualNoCase (This->OptionStr, "multicast")) {\r
+    } else if (NetStringEqualNoCase (This->OptionStr, (UINT8 *) "multicast")) {\r
       //\r
       // Multicast option, if it is a request, the value must be a zero\r
       // length string, otherwise, it is formated like "204.0.0.1,1857,1\0"\r
@@ -537,6 +534,6 @@ Mtftp4ParseOptionOack (
 \r
   Status = Mtftp4ParseOption (OptionList, Count, FALSE, MtftpOption);\r
 \r
-  NetFreePool (OptionList);\r
+  gBS->FreePool (OptionList);\r
   return Status;\r
 }\r