diff --git a/boot/source/main.c b/boot/source/main.c index c29175f..d2c89ad 100644 --- a/boot/source/main.c +++ b/boot/source/main.c @@ -62,7 +62,7 @@ u32 load_dol_image(void *dolstart) int main(int argc, char **argv) { memcpy(buffer, (void *) hbf_dol, hbf_dol_size); - + u32 exeEntryPointAddress = load_dol_image(buffer); entrypoint exeEntryPoint = (entrypoint) exeEntryPointAddress; u32 level; @@ -71,7 +71,7 @@ int main(int argc, char **argv) { __exception_closeall(); exeEntryPoint(); _CPU_ISR_Restore(level); - + exit(0); } diff --git a/installer/source/RuntimeIOSPatch.c b/installer/source/RuntimeIOSPatch.c index aea59dd..b977f9c 100644 --- a/installer/source/RuntimeIOSPatch.c +++ b/installer/source/RuntimeIOSPatch.c @@ -25,7 +25,7 @@ u32 apply_patch(const char *name, const u8 *old, u32 old_size, const u8 *patch, u8 *ptr = (u8 *) 0x93400000; u32 i, found = 0; u8 *start; - + while ((u32) ptr < (0x94000000 - old_size)) { if(!memcmp(ptr, old, old_size)) diff --git a/installer/source/sha1.c b/installer/source/sha1.c index 7ce9e6d..e60377d 100644 --- a/installer/source/sha1.c +++ b/installer/source/sha1.c @@ -170,7 +170,7 @@ unsigned char finalcount[8]; void SHA1(unsigned char *ptr, unsigned int size, unsigned char *outbuf) { SHA1_CTX ctx; - + SHA1Init(&ctx); SHA1Update(&ctx, ptr, size); SHA1Final(outbuf, &ctx); diff --git a/installer/source/wad.c b/installer/source/wad.c index 5edb439..c310af1 100644 --- a/installer/source/wad.c +++ b/installer/source/wad.c @@ -49,7 +49,7 @@ void mopen() startOfData = (void *) install_wad; endOfData = (void *) install_wad + size; internalPointer = startOfData; - + // Title ID wadHeader *header = NULL; signed_blob *p_tik = NULL; @@ -83,31 +83,31 @@ out: title_id = tik_data->titleid; } -int mseek(u32 offset, int origin) +int mseek(u32 offset, int origin) { - if (origin == SEEK_SET) + if (origin == SEEK_SET) { internalPointer = startOfData + offset; - } else if (origin == SEEK_CUR) + } else if (origin == SEEK_CUR) { internalPointer = internalPointer + offset; } else if (origin == SEEK_END) { internalPointer = endOfData - offset; - } else + } else { return -2; } - - if ((internalPointer endOfData)) + + if ((internalPointer endOfData)) { return -1; - } else + } else { return 0; } } -int mread(void * buf, int size, int count) +int mread(void * buf, int size, int count) { memcpy(buf, internalPointer, size*count); //DCFlushRange(buf, size*count); @@ -220,7 +220,7 @@ void __Wad_FixTicket(signed_blob *p_tik) if (*ckey > 1) { // Set common key *ckey = 0; - + // Fakesign ticket Title_FakesignTik(p_tik); } @@ -235,7 +235,7 @@ s32 __Wad_Install(int startpos_x, int startpos_y) u32 cnt, offset = 0; s32 ret; - + /* WAD header */ ret = __Wad_ReadAlloc((void *)&header, offset, sizeof(wadHeader)); if (ret >= 0) @@ -300,7 +300,7 @@ s32 __Wad_Install(int startpos_x, int startpos_y) u32 idx = 0, len; s32 cfd; - + printf("....."); /* Encrypted content size */ len = round_up(content->size, 64); @@ -351,7 +351,7 @@ s32 __Wad_Install(int startpos_x, int startpos_y) Con_FgColor(2, 1); printf("\x1b[%i;%iH", startpos_x +6, startpos_y); printf("SUCCESS"); - + goto out; } @@ -490,12 +490,12 @@ out: return ret; } -s32 Wad_InstallFromMemory(int startpos_x, int startpos_y) +s32 Wad_InstallFromMemory(int startpos_x, int startpos_y) { return __Wad_Install(startpos_x, startpos_y); } -s32 Wad_UninstallFromMemory(int startpos_x, int startpos_y) +s32 Wad_UninstallFromMemory(int startpos_x, int startpos_y) { return __Wad_Uninstall(startpos_x, startpos_y); }