Update syscall to use screaming uppercase casing for a constant

This commit is contained in:
sBubshait
2024-11-04 00:29:07 +00:00
parent ade8faf0f4
commit e718159ed8

View File

@@ -34,7 +34,7 @@ static const syscall_arguments syscall_lookup[] = {
/* The number of syscall functions (i.e, number of elements) within the
syscall_lookup table. */
static const int lookup_size
static const int LOOKUP_SIZE
= sizeof (syscall_lookup) / sizeof (syscall_arguments);
void
@@ -51,7 +51,7 @@ syscall_handler (struct intr_frame *f)
int syscall_number = *(int *) f->esp;
/* Ensures the number corresponds to a system call that can be handled. */
if (syscall_number < 0 || syscall_number >= lookup_size)
if (syscall_number < 0 || syscall_number >= LOOKUP_SIZE)
thread_exit ();
syscall_arguments syscall = syscall_lookup[syscall_number];