summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/syscall.c b/syscall.c
index 4853e35..d7cf123 100644
--- a/syscall.c
+++ b/syscall.c
@@ -133,8 +133,9 @@ static int (*syscalls[])(void) = {
void
syscall(void)
{
- int num = cp->tf->eax;
-
+ int num;
+
+ num = cp->tf->eax;
if(num >= 0 && num < NELEM(syscalls) && syscalls[num])
cp->tf->eax = syscalls[num]();
else {