UINTN DataSizeFromFile2;\r
CHAR16 *FileName1;\r
CHAR16 *FileName2;\r
+ CONST CHAR16 *TempParam;\r
\r
ErrorCount = 0;\r
ShellStatus = SHELL_SUCCESS;\r
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_TOO_FEW), gShellDebug1HiiHandle);\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else {\r
- FileName1 = ShellFindFilePath(ShellCommandLineGetRawValue(Package, 1));\r
+ TempParam = ShellCommandLineGetRawValue(Package, 1);\r
+ ASSERT(TempParam != NULL);\r
+ FileName1 = ShellFindFilePath(TempParam);\r
if (FileName1 == NULL) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, ShellCommandLineGetRawValue(Package, 1));\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, TempParam);\r
ShellStatus = SHELL_NOT_FOUND;\r
} else {\r
Status = ShellOpenFileByName(FileName1, &FileHandle1, EFI_FILE_MODE_READ, 0);\r
if (EFI_ERROR(Status)) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_OPEN_FAIL), gShellDebug1HiiHandle, ShellCommandLineGetRawValue(Package, 1), Status);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_OPEN_FAIL), gShellDebug1HiiHandle, TempParam, Status);\r
ShellStatus = SHELL_NOT_FOUND;\r
}\r
}\r
- FileName2 = ShellFindFilePath(ShellCommandLineGetRawValue(Package, 2));\r
+ TempParam = ShellCommandLineGetRawValue(Package, 2);\r
+ ASSERT(TempParam != NULL);\r
+ FileName2 = ShellFindFilePath(TempParam);\r
if (FileName2 == NULL) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, ShellCommandLineGetRawValue(Package, 2));\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_FIND_FAIL), gShellDebug1HiiHandle, TempParam);\r
ShellStatus = SHELL_NOT_FOUND;\r
} else {\r
Status = ShellOpenFileByName(FileName2, &FileHandle2, EFI_FILE_MODE_READ, 0);\r
if (EFI_ERROR(Status)) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_OPEN_FAIL), gShellDebug1HiiHandle, ShellCommandLineGetRawValue(Package, 2), Status);\r
+ ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_FILE_OPEN_FAIL), gShellDebug1HiiHandle, TempParam, Status);\r
ShellStatus = SHELL_NOT_FOUND;\r
}\r
}\r