Remove unneeded casts

This commit is contained in:
Aurora 2016-03-23 15:16:40 +01:00
parent 094b88b6aa
commit 96e46b2234
5 changed files with 6 additions and 6 deletions

View File

@ -52,7 +52,7 @@ void *getMPU(void *pos, u32 size){
return memsearch(pos, pattern, size, 4); return memsearch(pos, pattern, size, 4);
} }
u8 *getEmuCode(void *pos, u32 size, u8 *proc9Offset){ void *getEmuCode(void *pos, u32 size, u8 *proc9Offset){
const unsigned char pattern[] = {0x00, 0xFF, 0xFF, 0xFF}; const unsigned char pattern[] = {0x00, 0xFF, 0xFF, 0xFF};
//Looking for the last free space before Process9 //Looking for the last free space before Process9

View File

@ -14,4 +14,4 @@ void getEmunandSect(u32 *off, u32 *head, u32 emuNAND);
u32 getSDMMC(void *pos, u32 size); u32 getSDMMC(void *pos, u32 size);
void getEmuRW(void *pos, u32 size, u32 *readOff, u32 *writeOff); void getEmuRW(void *pos, u32 size, u32 *readOff, u32 *writeOff);
void *getMPU(void *pos, u32 size); void *getMPU(void *pos, u32 size);
u8 *getEmuCode(void *pos, u32 size, u8 *proc9Offset); void *getEmuCode(void *pos, u32 size, u8 *proc9Offset);

View File

@ -166,7 +166,7 @@ static void loadEmu(u8 *proc9Offset){
emuRead, emuRead,
emuWrite; emuWrite;
u8 *emuCodeOffset = getEmuCode(arm9Section, section[2].size, proc9Offset); void *emuCodeOffset = getEmuCode(arm9Section, section[2].size, proc9Offset);
memcpy(emuCodeOffset, emunand, emunand_size); memcpy(emuCodeOffset, emunand, emunand_size);
//Look for emuNAND //Look for emuNAND
@ -215,7 +215,7 @@ void patchFirm(void){
//Patch FIRM reboots, not on 9.0 FIRM as it breaks firmlaunchhax //Patch FIRM reboots, not on 9.0 FIRM as it breaks firmlaunchhax
if(mode){ if(mode){
//Read reboot code from SD //Read reboot code from SD
u8 *rebootOffset = getReboot(arm9Section, section[2].size); void *rebootOffset = getReboot(arm9Section, section[2].size);
memcpy(rebootOffset, reboot, reboot_size); memcpy(rebootOffset, reboot, reboot_size);
//Calculate the fOpen offset and put it in the right location //Calculate the fOpen offset and put it in the right location

View File

@ -42,7 +42,7 @@ void getSignatures(void *pos, u32 size, u32 *off, u32 *off2){
*off2 = (u32)memsearch(pos, pattern2, size, 4) - 1; *off2 = (u32)memsearch(pos, pattern2, size, 4) - 1;
} }
u8 *getReboot(void *pos, u32 size){ void *getReboot(void *pos, u32 size){
//Look for FIRM reboot code //Look for FIRM reboot code
const unsigned char pattern[] = {0xDE, 0x1F, 0x8D, 0xE2}; const unsigned char pattern[] = {0xDE, 0x1F, 0x8D, 0xE2};

View File

@ -22,6 +22,6 @@ const u8 writeBlock[4];
**************************************************/ **************************************************/
u8 *getProc9(void *pos, u32 size); u8 *getProc9(void *pos, u32 size);
void getSignatures(void *pos, u32 size, u32 *off, u32 *off2); void getSignatures(void *pos, u32 size, u32 *off, u32 *off2);
u8 *getReboot(void *pos, u32 size); void *getReboot(void *pos, u32 size);
u32 getfOpen(void *pos, u32 size, u8 *proc9Offset); u32 getfOpen(void *pos, u32 size, u8 *proc9Offset);
void *getFirmWrite(void *pos, u32 size); void *getFirmWrite(void *pos, u32 size);