diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2015-11-17 10:09:25 +0000 |
---|---|---|
committer | niruiyu <niruiyu@Edk2> | 2015-11-17 10:09:25 +0000 |
commit | f9a24380b8809d933317ac0fc0e3fe450d918374 (patch) | |
tree | 56b7589059e09ffe9e8fcf7c25d6893c6cce76c6 /MdeModulePkg | |
parent | 418e8cd9240af2249be0cb1d1e38b81b603218e4 (diff) | |
download | edk2-platforms-f9a24380b8809d933317ac0fc0e3fe450d918374.tar.xz |
MdeModulePkg: Use BM_OPTION_NAME_LEN instead of sizeof L"Boot####"
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Sunny Wang <sunnywang@hpe.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18856 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c index ff1cbe933c..f902357255 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c @@ -45,7 +45,7 @@ BmIsKeyOptionValid ( IN EFI_BOOT_MANAGER_KEY_OPTION *KeyOption
)
{
- UINT16 OptionName[sizeof (L"Boot####")];
+ UINT16 OptionName[BM_OPTION_NAME_LEN];
UINT8 *BootOption;
UINTN BootOptionSize;
UINT32 Crc;
@@ -349,7 +349,7 @@ BmHotkeyCallback ( {
LIST_ENTRY *Link;
BM_HOTKEY *Hotkey;
- CHAR16 OptionName[sizeof ("Boot####")];
+ CHAR16 OptionName[BM_OPTION_NAME_LEN];
EFI_STATUS Status;
EFI_KEY_DATA *HotkeyData;
@@ -905,13 +905,13 @@ EfiBootManagerAddKeyOptionVariable ( VA_LIST Args;
VOID *BootOption;
UINTN BootOptionSize;
- CHAR16 BootOptionName[sizeof (L"Boot####")];
+ CHAR16 BootOptionName[BM_OPTION_NAME_LEN];
EFI_BOOT_MANAGER_KEY_OPTION KeyOption;
EFI_BOOT_MANAGER_KEY_OPTION *KeyOptions;
UINTN KeyOptionCount;
UINTN Index;
UINTN KeyOptionNumber;
- CHAR16 KeyOptionName[sizeof (L"Key####")];
+ CHAR16 KeyOptionName[sizeof ("Key####")];
UnicodeSPrint (BootOptionName, sizeof (BootOptionName), L"Boot%04x", BootOptionNumber);
GetEfiGlobalVariable2 (BootOptionName, &BootOption, &BootOptionSize);
@@ -1018,7 +1018,7 @@ EfiBootManagerDeleteKeyOptionVariable ( BM_HOTKEY *Hotkey;
UINT32 ShiftState;
BOOLEAN Match;
- CHAR16 KeyOptionName[sizeof (L"Key####")];
+ CHAR16 KeyOptionName[sizeof ("Key####")];
ZeroMem (&KeyOption, sizeof (EFI_BOOT_MANAGER_KEY_OPTION));
VA_START (Args, Modifier);
|