summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Library/UefiBootManagerLib
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2016-11-17 16:25:32 +0800
committerHao Wu <hao.a.wu@intel.com>2017-01-12 21:26:28 +0800
commit51dee9a4b411573687c85be075c012859486d96f (patch)
tree1cba588915357cbcc4dd926b66e3721db0457f92 /MdeModulePkg/Library/UefiBootManagerLib
parent6dee8f78f2ac07d7de99b13630a0aa0613d888de (diff)
downloadedk2-51dee9a4b411573687c85be075c012859486d96f.tar.gz
edk2-51dee9a4b411573687c85be075c012859486d96f.tar.bz2
edk2-51dee9a4b411573687c85be075c012859486d96f.zip
MdeModulePkg/UefiBootManagerLib: Remove redundant type cast
The type of return value for function EfiBootManagerFindLoadOption() is INTN. When checking its return value, it is unnecessary to type cast -1 to type UINTN. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Hao Wu <hao.a.wu@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Sunny Wang <sunnywang@hpe.com>
Diffstat (limited to 'MdeModulePkg/Library/UefiBootManagerLib')
-rw-r--r--MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index 6b84b85fca..75bd5dcfb0 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -1,7 +1,7 @@
/** @file
Library functions which relates with booting.
-Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -2152,7 +2152,7 @@ EfiBootManagerRefreshAllBootOption (
// Only check those added by BDS
// so that the boot options added by end-user or OS installer won't be deleted
//
- if (EfiBootManagerFindLoadOption (&NvBootOptions[Index], BootOptions, BootOptionCount) == (UINTN) -1) {
+ if (EfiBootManagerFindLoadOption (&NvBootOptions[Index], BootOptions, BootOptionCount) == -1) {
Status = EfiBootManagerDeleteLoadOptionVariable (NvBootOptions[Index].OptionNumber, LoadOptionTypeBoot);
//
// Deleting variable with current variable implementation shouldn't fail.
@@ -2166,7 +2166,7 @@ EfiBootManagerRefreshAllBootOption (
// Add new EFI boot options to NV
//
for (Index = 0; Index < BootOptionCount; Index++) {
- if (EfiBootManagerFindLoadOption (&BootOptions[Index], NvBootOptions, NvBootOptionCount) == (UINTN) -1) {
+ if (EfiBootManagerFindLoadOption (&BootOptions[Index], NvBootOptions, NvBootOptionCount) == -1) {
EfiBootManagerAddLoadOptionVariable (&BootOptions[Index], (UINTN) -1);
//
// Try best to add the boot options so continue upon failure.