]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c
Use Mde library and definition instead of some native definitions in NetLib, to simpl...
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4Option.c
index e1f059e89ff8a4126f9b9feabc625268870f041e..f3caf6e03d04265e5e7b475fe6bb1c494618b240 100644 (file)
@@ -47,9 +47,9 @@ Ip4OptionIsValid (
   UINT32                    Cur;\r
   UINT32                    Len;\r
   UINT32                    Point;\r
-  UINT8                     IcmpType;\r
-  UINT8                     IcmpCode;\r
-  UINT32                    IcmpPoint;\r
+  volatile UINT8            IcmpType;\r
+  volatile UINT8            IcmpCode;\r
+  volatile UINT32           IcmpPoint;\r
 \r
   IcmpType  = ICMP_PARAMETER_PROBLEM;\r
   IcmpCode  = 0;\r
@@ -181,7 +181,7 @@ Ip4CopyOption (
       // don't copy options that is only valid for the first fragment\r
       //\r
       if (FirstFragment || (Type & IP4_OPTION_COPY_MASK)) {\r
-        NetCopyMem (OptBuf + Next, Option + Cur, Len);\r
+        CopyMem (OptBuf + Next, Option + Cur, Len);\r
         Next += Len;\r
       }\r
 \r
@@ -224,8 +224,8 @@ Ip4CopyOption (
   // Copy the option to the Buf, zero the buffer first to pad\r
   // the options with NOP to align to 4 bytes.\r
   //\r
-  NetZeroMem (Buf, Len);\r
-  NetCopyMem (Buf, OptBuf, Next);\r
+  ZeroMem (Buf, Len);\r
+  CopyMem (Buf, OptBuf, Next);\r
   *BufLen = Len;\r
   return EFI_SUCCESS;\r
 }\r