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>
This commit is contained in:
Hao Wu 2018-01-03 16:15:11 +08:00
parent fe90d0d2ad
commit 3710ec21d5
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
Common basic Library Functions 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 This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License 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 which accompanies this distribution. The full text of the license may be found at
@ -2032,8 +2032,8 @@ StrToIpv6Address (
return RETURN_UNSUPPORTED; return RETURN_UNSUPPORTED;
} }
memcpy (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart); memcpy (&Address->Addr[0], &LocalAddress.Addr[0], CompressStart);
memset (&Address->Addr[CompressStart], 0, ARRAY_SIZE (Address->Addr) - AddressIndex);
if (AddressIndex > CompressStart) { if (AddressIndex > CompressStart) {
memset (&Address->Addr[CompressStart], 0, ARRAY_SIZE (Address->Addr) - AddressIndex);
memcpy ( memcpy (
&Address->Addr[CompressStart + ARRAY_SIZE (Address->Addr) - AddressIndex], &Address->Addr[CompressStart + ARRAY_SIZE (Address->Addr) - AddressIndex],
&LocalAddress.Addr[CompressStart], &LocalAddress.Addr[CompressStart],