]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Ip6Dxe/Ip6Icmp.c
NetworkPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / NetworkPkg / Ip6Dxe / Ip6Icmp.c
index db40b81d5ea8f6283b2e9740141b49eda32bc394..79fa34e0413fa3b02ef9e1973e7af2fdc397075d 100644 (file)
@@ -1,15 +1,10 @@
 /** @file\r
   The ICMPv6 handle routines to process the ICMPv6 control messages.\r
 \r
-  Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
 \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
-  http://opensource.org/licenses/bsd-license.php.\r
-\r
-  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 \r
@@ -472,14 +467,14 @@ Ip6GetPrefix (
   UINT8                     Mask;\r
   UINT8                     Value;\r
 \r
-  ASSERT ((Prefix != NULL) && (PrefixLength < IP6_PREFIX_NUM));\r
+  ASSERT ((Prefix != NULL) && (PrefixLength < IP6_PREFIX_MAX));\r
 \r
   if (PrefixLength == 0) {\r
     ZeroMem (Prefix, sizeof (EFI_IPv6_ADDRESS));\r
     return ;\r
   }\r
 \r
-  if (PrefixLength == IP6_PREFIX_NUM - 1) {\r
+  if (PrefixLength >= IP6_PREFIX_MAX) {\r
     return ;\r
   }\r
 \r
@@ -487,7 +482,7 @@ Ip6GetPrefix (
   Bit   = (UINT8) (PrefixLength % 8);\r
   Value = Prefix->Addr[Byte];\r
 \r
-  if ((Byte > 0) && (Byte < 16)) {\r
+  if (Byte > 0) {\r
     ZeroMem (Prefix->Addr + Byte, 16 - Byte);\r
   }\r
 \r