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
}\r
\r
LoadOption = (EFI_LOAD_OPTION *)Buffer;\r
- Description = (CHAR16 *)(&LoadOption->FilePathListLength + 1);\r
+ Description = (CHAR16*)(Buffer + sizeof (EFI_LOAD_OPTION));\r
DescriptionSize = StrSize (Description);\r
\r
if (LoadOption->FilePathListLength != 0) {\r