system/src/newlib/_syscalls.c
/* Return a pointer to the structure associated with
 the user file descriptor fd. */
Return a pointer to the structure associated with
the user file descriptor fd.
Return a pointer to the structure associated with the user file descriptor fd .
static struct fdent*
findslot (int fd)
{
  CHECK_INIT(_REENT);
  if ((unsigned int) fd >= MAX_OPEN_FILES)
    {
      return NULL;
    }
  if (openfiles[fd].handle == -1)
    {
      return NULL;
    }
  return &openfiles[fd];
}
static struct fdent * findslot ( int fd ) { CHECK_INIT ( _REENT ) ; if ( ( unsigned int ) fd >= MAX_OPEN_FILES ) { return NULL ; } if ( openfiles [ fd ] . handle == -1 ) { return NULL ; } return & openfiles [ fd ] ; }
Return a pointer to the structure associated with
the user file descriptor fd.
Return a pointer to the structure associated with the user file descriptor fd .
/* User file descriptor is out of range. */ /* User file descriptor is open? */ /* Valid. */