Skip to content

Commit ed4fe8f

Browse files
authored
Merge pull request #31 from ChinYikMing/pr
Fix hardcoded capacity
2 parents 39049fd + 991df75 commit ed4fe8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

main.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,14 @@ static void handle_sbi_ecall(vm_t *vm)
239239
vm->error = ERR_NONE;
240240
}
241241

242+
#define MAPPER_SIZE 4
243+
242244
struct mapper {
243245
char *addr;
244246
uint32_t size;
245247
};
246248

247-
/* FIXME: Avoid hardcoding the capacity */
248-
static struct mapper mapper[4] = {0};
249+
static struct mapper mapper[MAPPER_SIZE] = {0};
249250
static int map_index = 0;
250251
static void unmap_files(void)
251252
{

0 commit comments

Comments
 (0)