diff options
author | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-18 17:02:36 +0000 |
---|---|---|
committer | jcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-11-18 17:02:36 +0000 |
commit | 73c83c69c0f42f96bd3b74326b77c5fd528145df (patch) | |
tree | 28bf752737a5b31ff199bb30a033fa00cf7440ca /ShellPkg/Library | |
parent | 901ba0e78d02bd4407571c296871f96a0d225698 (diff) | |
download | edk2-platforms-73c83c69c0f42f96bd3b74326b77c5fd528145df.tar.xz |
ShellPkg: Correct incorrect use of sizeof to use macro for EFI_FILE_INFO size.
Signed-off-by: jcarsey
Reviewed-by: niruiyu
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12740 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ShellPkg/Library')
-rw-r--r-- | ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c b/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c index a93ef33c03..541e782925 100644 --- a/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c +++ b/ShellPkg/Library/UefiShellLevel2CommandsLib/Mv.c @@ -324,13 +324,13 @@ ValidateAndMoveFiles( // construct the new file info block
//
NewSize = StrSize(DestPath);
- NewSize += StrSize(Node->FileName) + sizeof(EFI_FILE_INFO) + sizeof(CHAR16);
+ NewSize += StrSize(Node->FileName) + SIZE_OF_EFI_FILE_INFO + sizeof(CHAR16);
NewFileInfo = AllocateZeroPool(NewSize);
if (NewFileInfo == NULL) {
ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_GEN_NO_MEM), gShellLevel2HiiHandle);
ShellStatus = SHELL_OUT_OF_RESOURCES;
} else {
- CopyMem(NewFileInfo, Node->Info, sizeof(EFI_FILE_INFO));
+ CopyMem(NewFileInfo, Node->Info, SIZE_OF_EFI_FILE_INFO);
if (DestPath[0] != L'\\') {
StrCpy(NewFileInfo->FileName, L"\\");
StrCat(NewFileInfo->FileName, DestPath);
@@ -350,7 +350,7 @@ ValidateAndMoveFiles( }
StrCat(NewFileInfo->FileName, Node->FileName);
}
- NewFileInfo->Size = sizeof(EFI_FILE_INFO) + StrSize(NewFileInfo->FileName);
+ NewFileInfo->Size = SIZE_OF_EFI_FILE_INFO + StrSize(NewFileInfo->FileName);
ShellPrintEx(-1, -1, HiiOutput, Node->FullName, NewFileInfo->FileName);
if (!EFI_ERROR(ShellFileExists(NewFileInfo->FileName))) {
|