Fix ultratypes types (#1454)

* Fix ultratypes types

* Add back size_t and NULL

* Callocs

* Callocs pt 2

* bool

* STDC version checks
This commit is contained in:
Derek Hensley
2023-11-15 22:01:42 -07:00
committed by GitHub
parent d9585d7444
commit 5acaec4486
54 changed files with 178 additions and 171 deletions
+2 -2
View File
@@ -19,9 +19,9 @@ void SystemArena_Free(void* ptr) {
__osFree(&gSystemArena, ptr);
}
void* SystemArena_Calloc(u32 elements, size_t size) {
void* SystemArena_Calloc(size_t num, size_t size) {
void* ptr;
size_t totalSize = elements * size;
size_t totalSize = num * size;
ptr = __osMalloc(&gSystemArena, totalSize);
if (ptr != NULL) {
+1 -1
View File
@@ -208,7 +208,7 @@ void Fault_RemoveAddrConvClient(FaultAddrConvClient* client) {
FaultAddrConvClient* iter = sFaultInstance->addrConvClients;
FaultAddrConvClient* lastIter = NULL;
OSIntMask mask;
bool listIsEmpty = false;
s32 listIsEmpty = false;
mask = osSetIntMask(1);
+3 -3
View File
@@ -34,13 +34,13 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
ioMsg.dramAddr = ram;
ioMsg.size = buffSize;
ret = osEPiStartDma(gCartHandle, &ioMsg, 0);
if (ret) {
if (ret != 0) {
goto END;
}
osRecvMesg(&queue, NULL, OS_MESG_BLOCK);
size -= buffSize;
rom = rom + buffSize;
rom += buffSize;
ram = (u8*)ram + buffSize;
}
}
@@ -50,7 +50,7 @@ s32 DmaMgr_DmaRomToRam(uintptr_t rom, void* ram, size_t size) {
ioMsg.dramAddr = ram;
ioMsg.size = size;
ret = osEPiStartDma(gCartHandle, &ioMsg, 0);
if (ret) {
if (ret != 0) {
goto END;
}