From 64d753f12d74b683b52862b7a4403fa2cd56a171 Mon Sep 17 00:00:00 2001 From: jcarsey Date: Tue, 29 Mar 2011 19:28:20 +0000 Subject: [PATCH] initialize variable before error returns. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11447 6f19259b-4bc3-4df7-8a09-765794883524 --- ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c index 012ea39a9a..eb1dbbd3fd 100644 --- a/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c +++ b/ShellPkg/Library/UefiHandleParsingLib/UefiHandleParsingLib.c @@ -1110,6 +1110,7 @@ ParseHandleDatabaseForChildControllers( if (MatchingHandleCount == NULL) { return (EFI_INVALID_PARAMETER); } + *MatchingHandleCount = 0; Status = PARSE_HANDLE_DATABASE_UEFI_DRIVERS ( ControllerHandle, @@ -1129,7 +1130,6 @@ ParseHandleDatabaseForChildControllers( return (EFI_NOT_FOUND); } - *MatchingHandleCount = 0; for (DriverBindingHandleIndex = 0; DriverBindingHandleIndex < DriverBindingHandleCount; DriverBindingHandleIndex++) { Status = PARSE_HANDLE_DATABASE_MANAGED_CHILDREN ( DriverBindingHandleBuffer[DriverBindingHandleIndex],