Use consistent way of checking if descriptor number is valid.
MFC after: 1 month
This commit is contained in:
parent
d3ec30e525
commit
21877e81ec
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=236918
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user