summaryrefslogtreecommitdiff
path: root/ShellPkg/Library
diff options
context:
space:
mode:
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c4
-rw-r--r--ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c3
2 files changed, 2 insertions, 5 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
index 087befd..ae36807 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Cp.c
@@ -286,7 +286,6 @@ ValidateAndCopyFiles(
VOID *Response;
UINTN PathLen;
CONST CHAR16 *Cwd;
- CONST CHAR16 *TempLocation;
UINTN NewSize;
if (Resp == NULL) {
@@ -479,7 +478,7 @@ ValidateAndCopyFiles(
break;
}
- if ((TempLocation = StrniCmp(Node->FullName, DestPath, StrLen(Node->FullName))) == 0
+ if ((StrniCmp(Node->FullName, DestPath, StrLen(Node->FullName)) == 0)
&& (DestPath[StrLen(Node->FullName)] == CHAR_NULL || DestPath[StrLen(Node->FullName)] == L'\\')
) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_CP_SD_SAME), gShellLevel2HiiHandle);
@@ -552,7 +551,6 @@ ProcessValidateAndCopyFiles(
} else if (List != NULL) {
ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink) != NULL);
ASSERT(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName != NULL);
- FileInfo = NULL;
FileInfo = gEfiShellProtocol->GetFileInfo(((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->Handle);
ASSERT(FileInfo != NULL);
StrnCatGrow(&FullName, NULL, ((EFI_SHELL_FILE_INFO *)List->Link.ForwardLink)->FullName, 0);
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
index 9ce915b..0d01ad7 100644
--- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
+++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c
@@ -136,7 +136,6 @@ GetDestinationLocation(
EFI_SHELL_FILE_INFO *DestList;
EFI_SHELL_FILE_INFO *Node;
CHAR16 *DestPath;
- CHAR16 *TempLocation;
UINTN NewSize;
DestList = NULL;
@@ -163,7 +162,7 @@ GetDestinationLocation(
//
// Not existing... must be renaming
//
- if ((TempLocation = StrStr(DestDir, L":")) == NULL) {
+ if (StrStr(DestDir, L":") == NULL) {
if (Cwd == NULL) {
ShellCloseFileMetaArg(&DestList);
return (SHELL_INVALID_PARAMETER);