svn commit: r305091 - head/sys/sys
Mateusz Guzik
mjg at FreeBSD.org
Tue Aug 30 21:48:11 UTC 2016
Author: mjg
Date: Tue Aug 30 21:48:10 2016
New Revision: 305091
URL: https://svnweb.freebsd.org/changeset/base/305091
Log:
fd: simplify fd testing in fget_locked by casting to u_int
Modified:
head/sys/sys/filedesc.h
Modified: head/sys/sys/filedesc.h
==============================================================================
--- head/sys/sys/filedesc.h Tue Aug 30 21:43:57 2016 (r305090)
+++ head/sys/sys/filedesc.h Tue Aug 30 21:48:10 2016 (r305091)
@@ -201,7 +201,7 @@ fget_locked(struct filedesc *fdp, int fd
FILEDESC_LOCK_ASSERT(fdp);
- if (fd < 0 || fd > fdp->fd_lastfile)
+ if ((u_int)fd > fdp->fd_lastfile)
return (NULL);
return (fdp->fd_ofiles[fd].fde_file);
More information about the svn-src-head
mailing list