From ed9b9f183163b5c4ce00e138635aa8913ca2d953 Mon Sep 17 00:00:00 2001 From: Marian Ohligs Date: Thu, 15 Sep 2011 23:26:48 +0200 Subject: [PATCH] bug fix in lseek --- kernel/syscall.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kernel/syscall.c b/kernel/syscall.c index 986d87b3..aca0e7ce 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -139,9 +139,8 @@ static int sys_lseek(int fd, off_t pos, int origin) int ret = -EINVAL; fildes_t* file = &(per_core(current_task)->fildes_table[fd]); - // Disabled for testing purposes - if (BUILTIN_EXPECT(file->node->type != FS_FILE - && file->node->type != FS_CHARDEVICE, 0)); + if (BUILTIN_EXPECT(!((file->node->type == FS_FILE) + || (file->node->type == FS_CHARDEVICE)), 0)) return -EINVAL; switch(origin)