]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c
MdeModulePkg: Add new macros and refine codes
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Ip4Dxe / Ip4If.c
index 669e041c102929adaa9a8dea3417121462756b14..e45727679638106bf2a021d833fa822fbb43aa8e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement IP4 pesudo interface.\r
   \r
-Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -581,7 +581,7 @@ Ip4SetAddress (
   Type                      = NetGetIpClass (IpAddr);\r
   ASSERT (Type <= IP4_ADDR_CLASSC);\r
   Len                       = NetGetMaskLength (SubnetMask);\r
-  ASSERT (Len < IP4_MASK_NUM);\r
+  ASSERT (Len <= IP4_MASK_MAX);\r
   Netmask                   = gIp4AllMasks[MIN (Len, Type << 3)];\r
   Interface->NetBrdcast     = (IpAddr | ~Netmask);\r
 \r