Skip to content

Commit

Permalink
Remove unnecessary casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
jief committed Nov 7, 2023
1 parent 0130602 commit dbb93ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion rEFIt_UEFI/Platform/Nvram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ LoadNvramPlist(
//
// load nvram.plist
//
Status = egLoadFile(RootDir, NVRAMPlistPath, (UINT8**)&NvramPtr, &Size);
Status = egLoadFile(RootDir, NVRAMPlistPath, &NvramPtr, &Size);
if(EFI_ERROR(Status)) {
DBG(" not present\n");
return Status;
Expand Down
6 changes: 3 additions & 3 deletions rEFIt_UEFI/Settings/ConfigManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
{
EFI_STATUS Status = EFI_NOT_FOUND;
UINTN Size = 0;
CHAR8* ConfigPtr = NULL;
UINT8* ConfigPtr = NULL;
// XStringW ConfigPlistPath;
// XStringW ConfigOemPath;

Expand All @@ -501,7 +501,7 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
if ( selfOem.oemDirExists() ) {
configPlistPath = SWPrintf("%ls\\%ls.plist", selfOem.getOemFullPath().wc_str(), ConfName.wc_str());
if (FileExists (&selfOem.getOemDir(), configFilename)) {
Status = egLoadFile(&selfOem.getOemDir(), configFilename.wc_str(), (UINT8**)&ConfigPtr, &Size);
Status = egLoadFile(&selfOem.getOemDir(), configFilename.wc_str(), &ConfigPtr, &Size);
if (EFI_ERROR(Status)) {
DBG("Cannot find %ls at path (%s): '%ls', trying '%ls'\n", configFilename.wc_str(), efiStrError(Status), selfOem.getOemFullPath().wc_str(), self.getCloverDirFullPath().wc_str());
}else{
Expand All @@ -512,7 +512,7 @@ EFI_STATUS LoadPlist(const XStringW& ConfName, C* plist)
if ( !selfOem.oemDirExists() || EFI_ERROR(Status)) {
configPlistPath = SWPrintf("%ls\\%ls.plist", self.getCloverDirFullPath().wc_str(), ConfName.wc_str());
if ( FileExists(&self.getCloverDir(), configFilename.wc_str())) {
Status = egLoadFile(&self.getCloverDir(), configFilename.wc_str(), (UINT8**)&ConfigPtr, &Size);
Status = egLoadFile(&self.getCloverDir(), configFilename.wc_str(), &ConfigPtr, &Size);
}
if (EFI_ERROR(Status)) {
DBG("Cannot find %ls at path '%ls' : %s\n", configFilename.wc_str(), self.getCloverDirFullPath().wc_str(), efiStrError(Status));
Expand Down
6 changes: 3 additions & 3 deletions rEFIt_UEFI/refit/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2522,7 +2522,7 @@ GetListOfThemes ()
EFI_FILE_INFO *DirEntry;
XStringW ThemeTestPath;
EFI_FILE *ThemeTestDir = NULL;
CHAR8 *ThemePtr = NULL;
UINT8 *ThemePtr = NULL;
UINTN Size = 0;

DbgHeader("GetListOfThemes");
Expand All @@ -2542,9 +2542,9 @@ GetListOfThemes ()
DBG("- [%02zu]: %ls", ThemeNameArray.size(), DirEntry->FileName);
Status = self.getThemesDir().Open(&self.getThemesDir(), &ThemeTestDir, DirEntry->FileName, EFI_FILE_MODE_READ, 0);
if (!EFI_ERROR(Status)) {
Status = egLoadFile(ThemeTestDir, CONFIG_THEME_FILENAME, (UINT8**)&ThemePtr, &Size);
Status = egLoadFile(ThemeTestDir, CONFIG_THEME_FILENAME, &ThemePtr, &Size);
if (EFI_ERROR(Status) || (ThemePtr == NULL) || (Size == 0)) {
Status = egLoadFile(ThemeTestDir, CONFIG_THEME_SVG, (UINT8**)&ThemePtr, &Size);
Status = egLoadFile(ThemeTestDir, CONFIG_THEME_SVG, &ThemePtr, &Size);
if (EFI_ERROR(Status)) {
Status = EFI_NOT_FOUND;
DBG(" - bad theme because %ls nor %ls can't be load", CONFIG_THEME_FILENAME, CONFIG_THEME_SVG);
Expand Down

0 comments on commit dbb93ab

Please sign in to comment.