From: John Hodge Date: Mon, 20 Dec 2010 01:52:13 +0000 (+0845) Subject: Fixed bad handling of VFS_AllocHandle_ X-Git-Tag: rel0.07~33 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=7e3a0260f0a6bb7bb1c1c001649b04bbe7ad6d52;p=tpg%2Facess2.git Fixed bad handling of VFS_AllocHandle_ --- 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; }