Revision: 19746
http://sourceforge.net/p/edk2/code/19746
Author: shenshushi
Date: 2016-01-26 08:17:19 +0000 (Tue, 26 Jan 2016)
Log Message:
-----------
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 <[email protected]>
Reviewed-by: Jaben Carsey <[email protected]>
Modified Paths:
--------------
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
Modified:
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
===================================================================
---
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
2016-01-26 06:02:05 UTC (rev 19745)
+++
trunk/edk2/ShellPkg/Library/UefiShellBcfgCommandLib/UefiShellBcfgCommandLib.c
2016-01-26 08:17:19 UTC (rev 19746)
@@ -1111,7 +1111,7 @@
}
LoadOption = (EFI_LOAD_OPTION *)Buffer;
- Description = (CHAR16 *)(&LoadOption->FilePathListLength + 1);
+ Description = (CHAR16*)(Buffer + sizeof (EFI_LOAD_OPTION));
DescriptionSize = StrSize (Description);
if (LoadOption->FilePathListLength != 0) {
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits