From 3909b6408c0125fe311d49a3029a2806993615f7 Mon Sep 17 00:00:00 2001 From: nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> Date: Thu, 29 Nov 2018 19:24:28 +0800 Subject: 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 --- src/link.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/link.c') diff --git a/src/link.c b/src/link.c index 687a6c07b..e4bd5053c 100644 --- a/src/link.c +++ b/src/link.c @@ -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; } -- cgit v1.2.3 From f9ff7316d5c7277eb7482e30121388cd65f4ecfc Mon Sep 17 00:00:00 2001 From: nullableVoidPtr <30564701+nullableVoidPtr@users.noreply.github.com> Date: Wed, 5 Dec 2018 22:31:01 +0800 Subject: Remove uses of INVALID_ defines, clean up some arrays with constants, and spaces -> tabs --- src/link.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/link.c') diff --git a/src/link.c b/src/link.c index e4bd5053c..79df699ef 100644 --- a/src/link.c +++ b/src/link.c @@ -2250,7 +2250,7 @@ static bool8 DoHandshake(void) u16 minRecv; playerCount = 0; - minRecv = INVALID_U16; + minRecv = 0xFFFF; if (gLink.handshakeAsMaster == TRUE) { REG_SIOMLT_SEND = MASTER_HANDSHAKE; @@ -2274,7 +2274,7 @@ static bool8 DoHandshake(void) } else { - if (gLink.tempRecvBuffer[i] != INVALID_U16) + if (gLink.tempRecvBuffer[i] != 0xFFFF) { playerCount = 0; } -- cgit v1.2.3