summaryrefslogtreecommitdiff
path: root/src/boot
diff options
context:
space:
mode:
authorAnghelo Carvajal <angheloalf95@gmail.com>2021-04-29 14:39:46 -0400
committerGitHub <noreply@github.com>2021-04-29 14:39:46 -0400
commit98aef8988adbcb5960e8001e70141d0d1a9034bd (patch)
treea0443e402cb6fa06b0f964aad6d38bf185fb2a9b /src/boot
parent0b8252cfe99651b3174ac8652ba133781e8e2105 (diff)
`assert` macro OK (#755)
* create assert macro and replace a bunch of __assert Signed-off-by: angie <angheloalf95@gmail.com> * Another bunch of assert Signed-off-by: angie <angheloalf95@gmail.com> * more assert Signed-off-by: angie <angheloalf95@gmail.com> * assert(false) Signed-off-by: angie <angheloalf95@gmail.com> * last assert used in matching code Signed-off-by: angie <angheloalf95@gmail.com> * the non-matchings Signed-off-by: angie <angheloalf95@gmail.com> * typo Signed-off-by: angie <angheloalf95@gmail.com> * format Signed-off-by: angie <angheloalf95@gmail.com> * change macro to uppercase Signed-off-by: angie <angheloalf95@gmail.com> * Apply suggestions from code review Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Change ASSERT(false) to ASSERT(0) Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
Diffstat (limited to 'src/boot')
-rw-r--r--src/boot/z_std_dma.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/boot/z_std_dma.c b/src/boot/z_std_dma.c
index d03ac8d7a..2235cf6cc 100644
--- a/src/boot/z_std_dma.c
+++ b/src/boot/z_std_dma.c
@@ -1651,17 +1651,9 @@ DmaMgr_DMARomToRam_end:
s32 DmaMgr_DmaCallback0(OSPiHandle* pihandle, OSIoMesg* mb, s32 direction) {
s32 ret;
- if (pihandle != gCartHandle) {
- __assert("pihandle == carthandle", "../z_std_dma.c", 530);
- }
-
- if (direction != OS_READ) {
- __assert("direction == OS_READ", "../z_std_dma.c", 531);
- }
-
- if (mb == NULL) {
- __assert("mb != NULL", "../z_std_dma.c", 532);
- }
+ ASSERT(pihandle == gCartHandle, "pihandle == carthandle", "../z_std_dma.c", 530);
+ ASSERT(direction == OS_READ, "direction == OS_READ", "../z_std_dma.c", 531);
+ ASSERT(mb != NULL, "mb != NULL", "../z_std_dma.c", 532);
if (D_80009460 == 10) {
osSyncPrintf("%10lld サウンドDMA %08x %08x %08x (%d)\n", OS_CYCLES_TO_USEC(osGetTime()), mb->dramAddr,