summaryrefslogtreecommitdiffstats
path: root/ShellPkg/Library/UefiShellBcfgCommandLib
diff options
context:
space:
mode:
authorQiu Shumin <shumin.qiu@intel.com>2016-01-26 08:17:19 +0000
committershenshushi <shenshushi@Edk2>2016-01-26 08:17:19 +0000
commitaed8c66dac8731e8175cdeaff78e24c1ff728b90 (patch)
treeab628c1a83db2b8565ba8c75f5968a99eefd24e0 /ShellPkg/Library/UefiShellBcfgCommandLib
parentd5b8efb6dc790814780415cf76adbd7f74cc1725 (diff)
downloadedk2-aed8c66dac8731e8175cdeaff78e24c1ff728b90.tar.gz
edk2-aed8c66dac8731e8175cdeaff78e24c1ff728b90.tar.bz2
edk2-aed8c66dac8731e8175cdeaff78e24c1ff728b90.zip
ShellPkg: Refine the code to avoid use a constant number as offset.
Refine the code to use 'sizeof(EFI_LOAD_OPTION)' as offset in buffer to get 'description' instead of using a constant number. This change makes the code more readable. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19746 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library/UefiShellBcfgCommandLib')
-rw-r--r--ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
index 6a078d81cc..b407608d31 100644
--- a/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
+++ b/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
@@ -1111,7 +1111,7 @@ BcfgDisplayDump(
}
LoadOption = (EFI_LOAD_OPTION *)Buffer;
- Description = (CHAR16 *)(&LoadOption->FilePathListLength + 1);
+ Description = (CHAR16*)(Buffer + sizeof (EFI_LOAD_OPTION));
DescriptionSize = StrSize (Description);
if (LoadOption->FilePathListLength != 0) {