Eliminate some more repeated pointer arithmetic.
This patch too is only refactoring.
Cc: Jaben Carsey <jaben.carsey@intel.com>
Cc: Ryan Harkin <ryan.harkin@linaro.org>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@19714
6f19259b-4bc3-4df7-8a09-
765794883524
EFI_LOAD_OPTION *LoadOption;\r
CHAR16 *Description;\r
UINTN DescriptionSize;\r
EFI_LOAD_OPTION *LoadOption;\r
CHAR16 *Description;\r
UINTN DescriptionSize;\r
+ UINTN OptionalDataOffset;\r
\r
if (OrderCount == 0) {\r
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_BCFG_NONE), gShellBcfgHiiHandle, L"bcfg"); \r
\r
if (OrderCount == 0) {\r
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN(STR_BCFG_NONE), gShellBcfgHiiHandle, L"bcfg"); \r
FilePathList = (UINT8 *)Description + DescriptionSize;\r
DevPathString = ConvertDevicePathToText(FilePathList, TRUE, FALSE);\r
}\r
FilePathList = (UINT8 *)Description + DescriptionSize;\r
DevPathString = ConvertDevicePathToText(FilePathList, TRUE, FALSE);\r
}\r
+\r
+ OptionalDataOffset = sizeof *LoadOption + DescriptionSize +\r
+ LoadOption->FilePathListLength;\r
+\r
ShellPrintHiiEx(\r
-1,\r
-1,\r
ShellPrintHiiEx(\r
-1,\r
-1,\r
VariableName,\r
Description,\r
DevPathString,\r
VariableName,\r
Description,\r
DevPathString,\r
- (DescriptionSize + LoadOption->FilePathListLength + 6) <= BufferSize?L'N':L'Y');\r
+ OptionalDataOffset <= BufferSize ? L'N' : L'Y'\r
+ );\r
- for (LoopVar2 = (DescriptionSize + LoadOption->FilePathListLength + 6);LoopVar2<BufferSize;LoopVar2++){\r
+ for (LoopVar2 = OptionalDataOffset; LoopVar2 < BufferSize; LoopVar2++){\r
ShellPrintEx(\r
-1,\r
-1,\r
ShellPrintEx(\r
-1,\r
-1,\r