]> git.proxmox.com Git - mirror_edk2.git/commit
NetworkPkg: Add new macros and refine codes
authorZhang Lubo <lubo.zhang@intel.com>
Fri, 8 Apr 2016 01:44:09 +0000 (09:44 +0800)
committerJiaxin Wu <jiaxin.wu@intel.com>
Mon, 11 Apr 2016 00:24:47 +0000 (08:24 +0800)
commitc720da286687aed978d9a20bcdd6d303bade9ddc
treed7c947c59f48d487f47ee96883ebd3fa632a41e3
parent70dc0b809c5ea4641a730a7750338048bae63be5
NetworkPkg: Add new macros and refine codes

v2:
*refine some codes

Add 2 macros in NetLib.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>
NetworkPkg/Ip6Dxe/Ip6Common.c
NetworkPkg/Ip6Dxe/Ip6Icmp.c
NetworkPkg/Ip6Dxe/Ip6Impl.c
NetworkPkg/Ip6Dxe/Ip6Nd.c
NetworkPkg/Ip6Dxe/Ip6Route.c