summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2021-10-24 02:38:59 +0200
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2021-10-24 02:38:59 +0200
commitd9068688be61ea6295a3b61f9428ceddf7e1467d (patch)
treeeca78b330ab9ab9815292d5de3ec2d600ea2b800
parent4b1beb6199245fe3e9dd3d052c9000dc6c0068f1 (diff)
malloc: remove useless goto
-rw-r--r--libpsx/src/memory.c4
1 files changed, 1 insertions, 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);