ArmPlatformPkg/Bds: Fix compiler warning

- Fix RVCT warning: 'SecondEntry' may be uninitialised.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-By: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15904 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Harry Liebel 2014-08-26 10:17:05 +00:00 committed by oliviermartin
parent d340ef7542
commit 749d91f7aa
1 changed files with 4 additions and 1 deletions

View File

@ -691,6 +691,7 @@ BootMenuReorderBootOptions (
}
SelectedEntry = &BootOptionEntry->Link;
SecondEntry = NULL;
// Note down the previous entry in the list to be able to cancel changes
PrevEntry = GetPreviousNode (BootOptionsList, SelectedEntry);
@ -739,7 +740,9 @@ BootMenuReorderBootOptions (
} while ((!Move) && (!Save) && (!Cancel));
if (Move) {
SwapListEntries (SelectedEntry, SecondEntry);
if ((SelectedEntry != NULL) && (SecondEntry != NULL)) {
SwapListEntries (SelectedEntry, SecondEntry);
}
} else {
if (Save) {
Status = GetGlobalEnvironmentVariable (