Fix two instances of printf("%s")'ing a FILE * instead of a char *

Signed-off-by: Lennert Buytenhek <buytenh@arista.com>
This commit is contained in:
Lennert Buytenhek 2022-06-27 12:15:07 +03:00 committed by Guo Dong
parent 4796c2e81b
commit 9cf6f1354e
2 changed files with 2 additions and 2 deletions

View File

@ -542,7 +542,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment)
PeFileBuffer = (UINT8 *) malloc (PeFileSize);
if (PeFileBuffer == NULL) {
fclose (InFileHandle);
Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle);
Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFile);
return EFI_OUT_OF_RESOURCES;
}
fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);

View File

@ -1062,7 +1062,7 @@ GetAlignmentFromFile(char *InFile, UINT32 *Alignment)
PeFileBuffer = (UINT8 *) malloc (PeFileSize);
if (PeFileBuffer == NULL) {
fclose (InFileHandle);
Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle);
Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFile);
return EFI_OUT_OF_RESOURCES;
}
fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);