Fix alloc.c as per #386, define INVALID_ constants and rename malloc to alloc as per #325

Some of the INVALID_ are likely erroneously placed, due to lack of documentation
This commit is contained in:
nullableVoidPtr
2018-11-29 19:24:28 +08:00
parent 1b33ad6c26
commit 3909b6408c
148 changed files with 1116 additions and 1108 deletions
+3 -3
View File
@@ -2,7 +2,7 @@
// Includes
#include "global.h"
#include "m4a.h"
#include "malloc.h"
#include "alloc.h"
#include "reset_save_heap.h"
#include "save.h"
#include "bg.h"
@@ -2250,7 +2250,7 @@ static bool8 DoHandshake(void)
u16 minRecv;
playerCount = 0;
minRecv = 0xFFFF;
minRecv = INVALID_U16;
if (gLink.handshakeAsMaster == TRUE)
{
REG_SIOMLT_SEND = MASTER_HANDSHAKE;
@@ -2274,7 +2274,7 @@ static bool8 DoHandshake(void)
}
else
{
if (gLink.tempRecvBuffer[i] != 0xFFFF)
if (gLink.tempRecvBuffer[i] != INVALID_U16)
{
playerCount = 0;
}