]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg: Add new macros and refine codes
authorZhang Lubo <lubo.zhang@intel.com>
Fri, 8 Apr 2016 01:48:14 +0000 (09:48 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Mon, 11 Apr 2016 00:25:33 +0000 (08:25 +0800)
commit364f4efa444150df3f074f563374dce1e153adc6
tree0ac1da2a778b68601b4d9081d43c5a4ed4d0d85b
parentc720da286687aed978d9a20bcdd6d303bade9ddc
MdeModulePkg: Add new macros and refine codes

Add 2 macros inNetLib.h
#define  IP4_MASK_MAX          32
#define  IP6_PREFIX_MAX        128
we will use these two macros to check the max mask/prefix length,
instead of
#define  IP4_MASK_NUM          33
#define  IP6_PREFIX_NUM        129
which means a valid number.
This will make the code readability and maintainability.

Cc: Subramanian Sriram <sriram-s@hpe.com>
Cc: Fu Siyuan <siyuan.fu@intel.com>
Cc: Ye Ting <ting.ye@intel.com>
Cc: Wu Jiaxin <jiaxin.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Zhang Lubo <lubo.zhang@intel.com>
Reviewed-by: Sriram Subramanian <sriram-s@hpe.com>
MdeModulePkg/Include/Library/NetLib.h
MdeModulePkg/Library/DxeNetLib/DxeNetLib.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c
MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.c