From 7e3a0260f0a6bb7bb1c1c001649b04bbe7ad6d52 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Mon, 20 Dec 2010 10:37:13 +0845 Subject: [PATCH] Fixed bad handling of VFS_AllocHandle_ --- Kernel/vfs/open.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kernel/vfs/open.c b/Kernel/vfs/open.c index 9aeca95b..51d7885e 100644 --- a/Kernel/vfs/open.c +++ b/Kernel/vfs/open.c @@ -510,7 +510,7 @@ int VFS_Open(const char *Path, Uint Mode) } i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode ); - if( i > 0 ) { + if( i >= 0 ) { LEAVE('x', i); return i; } @@ -570,7 +570,7 @@ int VFS_OpenChild(Uint *Errno, int FD, const char *Name, Uint Mode) } i = VFS_AllocHandle( !!(Mode & VFS_OPENFLAG_USER), node, Mode ); - if( i > 0 ) { + if( i >= 0 ) { LEAVE('x', i); return i; } -- 2.20.1