diff options
author | Wang Fan <fan.wang@intel.com> | 2018-01-02 10:56:44 +0800 |
---|---|---|
committer | Fu Siyuan <siyuan.fu@intel.com> | 2018-01-04 10:55:14 +0800 |
commit | 2a2f01b9a08d82b9a0de8d893c4c845edaae81b8 (patch) | |
tree | f7a44a22540e6cbf9acdad2c05a701a3587a09cb /MdeModulePkg/Library/DxeNetLib | |
parent | bee14e9ebc8db1cfa5ead35834df9a9d02101bda (diff) | |
download | edk2-2a2f01b9a08d82b9a0de8d893c4c845edaae81b8.tar.gz edk2-2a2f01b9a08d82b9a0de8d893c4c845edaae81b8.tar.bz2 edk2-2a2f01b9a08d82b9a0de8d893c4c845edaae81b8.zip |
MdeModulePkg/DxeNetLib: Fix a potential issue in macro definition.
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>
Diffstat (limited to 'MdeModulePkg/Library/DxeNetLib')
-rw-r--r-- | MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index 26a80a79a2..0f00f79fe4 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/PrintLib.h>
#include <Library/UefiLib.h>
-#define NIC_ITEM_CONFIG_SIZE sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE
+#define NIC_ITEM_CONFIG_SIZE (sizeof (NIC_IP4_CONFIG_INFO) + sizeof (EFI_IP4_ROUTE_TABLE) * MAX_IP4_CONFIG_IN_VARIABLE)
#define DEFAULT_ZERO_START ((UINTN) ~0)
//
|