]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/IpSecDxe/IpSecConfigImpl.c
NetworkPkg: Refine casting expression result to bigger size
[mirror_edk2.git] / NetworkPkg / IpSecDxe / IpSecConfigImpl.c
index cfee978d949831c97233e7fbc44130ccbdcd790f..4a51bff96f420bf2cbb7a95576f6051f6949a87c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   The implementation of IPSEC_CONFIG_PROTOCOL.\r
 \r
-  Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -1152,7 +1152,7 @@ SetSpdEntry (
   // Do Padding for the different Arch.\r
   //\r
   SpdEntrySize  = ALIGN_VARIABLE (sizeof (IPSEC_SPD_ENTRY));\r
-  SpdEntrySize  = ALIGN_VARIABLE (SpdEntrySize + (UINTN)SIZE_OF_SPD_SELECTOR (SpdSel));\r
+  SpdEntrySize  = ALIGN_VARIABLE (SpdEntrySize + SIZE_OF_SPD_SELECTOR (SpdSel));\r
   SpdEntrySize += IpSecGetSizeOfEfiSpdData (SpdData);\r
 \r
   SpdEntry = AllocateZeroPool (SpdEntrySize);\r
@@ -1357,7 +1357,7 @@ SetSadEntry (
   }\r
 \r
   if (SaData->SpdSelector != NULL) {\r
-    SadEntrySize += SadEntrySize + (UINTN)SIZE_OF_SPD_SELECTOR (SaData->SpdSelector);\r
+    SadEntrySize += SadEntrySize + SIZE_OF_SPD_SELECTOR (SaData->SpdSelector);\r
   }\r
   SadEntry      = AllocateZeroPool (SadEntrySize);\r
 \r
@@ -1458,7 +1458,7 @@ SetSadEntry (
       SadEntry->Data->SpdEntry = SpdEntry;\r
       SadEntry->Data->SpdSelector = (EFI_IPSEC_SPD_SELECTOR *)((UINT8 *)SadEntry +\r
                                                                 SadEntrySize -\r
-                                                                (UINTN)SIZE_OF_SPD_SELECTOR (SaData->SpdSelector)\r
+                                                                SIZE_OF_SPD_SELECTOR (SaData->SpdSelector)\r
                                                                 );\r
       DuplicateSpdSelector (\r
        (EFI_IPSEC_CONFIG_SELECTOR *) SadEntry->Data->SpdSelector,\r