summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2018-01-03 16:15:11 +0800
committerHao Wu <hao.a.wu@intel.com>2018-01-15 10:42:16 +0800
commit3710ec21d59cd1764a4075af419e70332d7f0a3c (patch)
tree1f756a904b9c2ccd2802c7541b68215826c767c7 /BaseTools
parentfe90d0d2ad3ed2e382fd1384fdf05969a95f2cdf (diff)
downloadedk2-3710ec21d59cd1764a4075af419e70332d7f0a3c.zip
edk2-3710ec21d59cd1764a4075af419e70332d7f0a3c.tar.gz
edk2-3710ec21d59cd1764a4075af419e70332d7f0a3c.tar.bz2
BaseTools/C/Common: Fix code to be more readable
The change doesn't impact the functionality. Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/Common/CommonLib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/BaseTools/Source/C/Common/CommonLib.c b/BaseTools/Source/C/Common/CommonLib.c
index 90cc578..15509e3 100644
--- a/BaseTools/Source/C/Common/CommonLib.c
+++ b/BaseTools/Source/C/Common/CommonLib.c
@@ -1,7 +1,7 @@
/** @file
Common basic Library Functions
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -2032,8 +2032,8 @@ StrToIpv6Address (
return RETURN_UNSUPPORTED;
}
memcpy (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
- memset (&Address->Addr[CompressStart], 0, ARRAY_SIZE (Address->Addr) - AddressIndex);
if (AddressIndex > CompressStart) {
+ memset (&Address->Addr[CompressStart], 0, ARRAY_SIZE (Address->Addr) - AddressIndex);
memcpy (
&Address->Addr[CompressStart + ARRAY_SIZE (Address->Addr) - AddressIndex],
&LocalAddress.Addr[CompressStart],