bug fix in lseek

This commit is contained in:
Marian Ohligs 2011-09-15 23:26:48 +02:00
parent 4e0d89e67a
commit ed9b9f1831

View file

@ -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)