From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 20C6181953 for ; Mon, 9 Jan 2017 01:31:10 -0800 (PST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 09 Jan 2017 01:30:56 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,339,1477983600"; d="scan'208";a="211175746" Received: from ray-dev.ccr.corp.intel.com ([10.239.9.25]) by fmsmga004.fm.intel.com with ESMTP; 09 Jan 2017 01:30:55 -0800 From: Ruiyu Ni To: edk2-devel@lists.01.org Cc: Jaben Carsey Date: Mon, 9 Jan 2017 17:30:48 +0800 Message-Id: <20170109093052.140504-2-ruiyu.ni@intel.com> X-Mailer: git-send-email 2.9.0.windows.1 In-Reply-To: <20170109093052.140504-1-ruiyu.ni@intel.com> References: <20170109093052.140504-1-ruiyu.ni@intel.com> Subject: [PATCH 1/5] ShellPkg/HandleParsingLib: Rename global variables X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jan 2017 09:31:10 -0000 Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Cc: Jaben Carsey --- .../UefiHandleParsingLib/UefiHandleParsingLib.c | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 28a582f..1049dea 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -1,7 +1,7 @@ /** @file Provides interface to advanced shell functionality for parsing both handle and protocol database. - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
(C) Copyright 2013-2015 Hewlett-Packard Development Company, L.P.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials @@ -19,8 +19,8 @@ EFI_HANDLE mHandleParsingHiiHandle = NULL; HANDLE_INDEX_LIST mHandleList = {{{NULL,NULL},0,0},0}; -GUID_INFO_BLOCK *GuidList; -UINTN GuidListCount; +GUID_INFO_BLOCK *mGuidList; +UINTN mGuidListCount; /** Function to translate the EFI_MEMORY_TYPE into a string. @@ -98,8 +98,8 @@ HandleParsingLibConstructor ( IN EFI_SYSTEM_TABLE *SystemTable ) { - GuidListCount = 0; - GuidList = NULL; + mGuidListCount = 0; + mGuidList = NULL; // // Do nothing with mHandleParsingHiiHandle. Initialize HII as needed. @@ -137,11 +137,11 @@ HandleParsingLibDestructor ( { UINTN LoopCount; - for (LoopCount = 0; GuidList != NULL && LoopCount < GuidListCount; LoopCount++) { - SHELL_FREE_NON_NULL(GuidList[LoopCount].GuidId); + for (LoopCount = 0; mGuidList != NULL && LoopCount < mGuidListCount; LoopCount++) { + SHELL_FREE_NON_NULL(mGuidList[LoopCount].GuidId); } - SHELL_FREE_NON_NULL(GuidList); + SHELL_FREE_NON_NULL(mGuidList); if (mHandleParsingHiiHandle != NULL) { HiiRemovePackages(mHandleParsingHiiHandle); } @@ -1838,7 +1838,7 @@ InternalShellGetNodeFromGuid( ASSERT(Guid != NULL); - for (LoopCount = 0, ListWalker = GuidList; GuidList != NULL && LoopCount < GuidListCount; LoopCount++, ListWalker++) { + for (LoopCount = 0, ListWalker = mGuidList; mGuidList != NULL && LoopCount < mGuidListCount; LoopCount++, ListWalker++) { if (CompareGuid(ListWalker->GuidId, Guid)) { return (ListWalker); } @@ -1881,18 +1881,18 @@ InsertNewGuidNameMapping( ASSERT(Guid != NULL); ASSERT(NameID != 0); - GuidList = ReallocatePool(GuidListCount * sizeof(GUID_INFO_BLOCK), GuidListCount+1 * sizeof(GUID_INFO_BLOCK), GuidList); - if (GuidList == NULL) { - GuidListCount = 0; + mGuidList = ReallocatePool(mGuidListCount * sizeof(GUID_INFO_BLOCK), mGuidListCount+1 * sizeof(GUID_INFO_BLOCK), mGuidList); + if (mGuidList == NULL) { + mGuidListCount = 0; return (EFI_OUT_OF_RESOURCES); } - GuidListCount++; + mGuidListCount++; - GuidList[GuidListCount - 1].GuidId = AllocateCopyPool(sizeof(EFI_GUID), Guid); - GuidList[GuidListCount - 1].StringId = NameID; - GuidList[GuidListCount - 1].DumpInfo = DumpFunc; + mGuidList[mGuidListCount - 1].GuidId = AllocateCopyPool(sizeof(EFI_GUID), Guid); + mGuidList[mGuidListCount - 1].StringId = NameID; + mGuidList[mGuidListCount - 1].DumpInfo = DumpFunc; - if (GuidList[GuidListCount - 1].GuidId == NULL) { + if (mGuidList[mGuidListCount - 1].GuidId == NULL) { return (EFI_OUT_OF_RESOURCES); } @@ -2061,7 +2061,7 @@ GetGuidFromStringName( } } - for (LoopCount = 0, ListWalker = GuidList; GuidList != NULL && LoopCount < GuidListCount; LoopCount++, ListWalker++) { + for (LoopCount = 0, ListWalker = mGuidList; mGuidList != NULL && LoopCount < mGuidListCount; LoopCount++, ListWalker++) { String = HiiGetString(mHandleParsingHiiHandle, ListWalker->StringId, Lang); if (Name != NULL && String != NULL && StringNoCaseCompare (&Name, &String) == 0) { *Guid = ListWalker->GuidId; -- 2.9.0.windows.1