From d9068688be61ea6295a3b61f9428ceddf7e1467d Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Sun, 24 Oct 2021 02:38:59 +0200 Subject: [PATCH] malloc: remove useless goto --- libpsx/src/memory.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libpsx/src/memory.c b/libpsx/src/memory.c index 3c63dc7..0cfb52e 100644 --- a/libpsx/src/memory.c +++ b/libpsx/src/memory.c @@ -87,7 +87,7 @@ void *malloc(size_t size) // printf("Page found at %dKb\n", x); for(y = 0; y < size; y++) - if(busy_pages[x+y] == 1) goto malloc_keep_finding; + if(busy_pages[x+y] == 1) continue; // We found the memory we wanted, now make it busy @@ -103,8 +103,6 @@ void *malloc(size_t size) return (void*)((unsigned int)0x80000000 + (x<<10)); } -malloc_keep_finding: - ; // Useless statement to make GCC not bail out... } printf("failed malloc(%d)\n", size);