Cygwin: change virtual_ftype_t to not rely on negative values
So far negative values were denoting files, positive values denoting directories. We should prefer a less error prone method. Redefine virtual_ftype_t to contain only positive values and replace checks for negativ or positive values with inline functions virt_ftype_isfile() and virt_ftype_isdir(). Drop outdcated comments referring to numerical virtual_ftype_t values. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -52,9 +52,6 @@ static const virt_tab_t procsysvipc_tab[] =
|
||||
static const int PROCSYSVIPC_LINK_COUNT =
|
||||
(sizeof (procsysvipc_tab) / sizeof (virt_tab_t)) - 1;
|
||||
|
||||
/* Returns 0 if path doesn't exist, >0 if path is a directory,
|
||||
* -1 if path is a file.
|
||||
*/
|
||||
virtual_ftype_t
|
||||
fhandler_procsysvipc::exists ()
|
||||
{
|
||||
|
Reference in New Issue
Block a user