summaryrefslogtreecommitdiff
path: root/syscall.c
diff options
context:
space:
mode:
Diffstat (limited to 'syscall.c')
-rw-r--r--syscall.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/syscall.c b/syscall.c
index 45f758e..799ebc2 100644
--- a/syscall.c
+++ b/syscall.c
@@ -129,9 +129,7 @@ syscall(void)
int num;
num = proc->tf->eax;
- if(num >= 0 && num < SYS_open && syscalls[num]) {
- proc->tf->eax = syscalls[num]();
- } else if (num >= SYS_open && num < NELEM(syscalls) && syscalls[num]) {
+ if(num > 0 && num < NELEM(syscalls) && syscalls[num]) {
proc->tf->eax = syscalls[num]();
} else {
cprintf("%d %s: unknown sys call %d\n",