malloc: remove useless goto

This commit is contained in:
Xavier Del Campo Romero 2021-10-24 02:38:59 +02:00
parent 4b1beb6199
commit d9068688be
1 changed files with 1 additions and 3 deletions

View File

@ -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);