]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/DxeNetLib: Fix a potential issue in macro definition.
authorWang Fan <fan.wang@intel.com>
Tue, 2 Jan 2018 02:56:44 +0000 (10:56 +0800)
committerFu Siyuan <siyuan.fu@intel.com>
Thu, 4 Jan 2018 02:55:14 +0000 (10:55 +0800)
The NIC_ITEM_CONFIG_SIZE macro in DxeNetLib is defined as:
sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) *
MAX_IP4_CONFIG_IN_VARIABLE. This macro should be surrounded
with parenthesis to avoid being incorrectly used.

Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Wang Fan <fan.wang@intel.com>
Reviewed-by: Jiaxin Wu <jiaxin.wu@intel.com>
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c

index 26a80a79a2eb323afcf7ce7023f384b21503a13d..0f00f79fe4a10634a1226c2837afe9183aad6621 100644 (file)
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PrintLib.h>\r
 #include <Library/UefiLib.h>\r
 \r
-#define NIC_ITEM_CONFIG_SIZE   sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE\r
+#define NIC_ITEM_CONFIG_SIZE   (sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE)\r
 #define DEFAULT_ZERO_START     ((UINTN) ~0)\r
 \r
 //\r