From 3710ec21d59cd1764a4075af419e70332d7f0a3c Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Wed, 3 Jan 2018 16:15:11 +0800 Subject: [PATCH] BaseTools/C/Common: Fix code to be more readable The change doesn't impact the functionality. Cc: Ruiyu Ni Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Yonghong Zhu Reviewed-by: Liming Gao --- BaseTools/Source/C/Common/CommonLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/C/Common/CommonLib.c b/BaseTools/Source/C/Common/CommonLib.c index 90cc578e61..15509e3453 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.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
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],