Use consistent way of checking if descriptor number is valid.

MFC after:	1 month
This commit is contained in:
pjd 2012-06-11 20:19:24 +00:00
parent b7902b949c
commit cc367c4a7e

View File

@ -141,7 +141,7 @@ static __inline struct file *
fget_locked(struct filedesc *fdp, int fd)
{
return (fd < 0 || fd >= fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]);
return ((unsigned int)fd >= fdp->fd_nfiles ? NULL : fdp->fd_ofiles[fd]);
}
#endif /* _KERNEL */