diff options
author | Harry Liebel <Harry.Liebel@arm.com> | 2014-08-26 10:17:05 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-08-26 10:17:05 +0000 |
commit | 749d91f7aaeb9dcc8afc0bf6d9444caff2c2ad62 (patch) | |
tree | 40799c952cc2077eec101805b5d132eb56895f70 | |
parent | d340ef7542df932198652d0d16109428337c4b30 (diff) | |
download | edk2-749d91f7aaeb9dcc8afc0bf6d9444caff2c2ad62.tar.gz edk2-749d91f7aaeb9dcc8afc0bf6d9444caff2c2ad62.tar.bz2 edk2-749d91f7aaeb9dcc8afc0bf6d9444caff2c2ad62.zip |
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
-rw-r--r-- | ArmPlatformPkg/Bds/BootMenu.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index 42212385a8..25dc1d4ae6 100644 --- a/ArmPlatformPkg/Bds/BootMenu.c +++ b/ArmPlatformPkg/Bds/BootMenu.c @@ -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 (
|