sys/devfs: unsign an index to prevent signed integer overflow.

cdp_maxdirent in struct:cdev_priv is of type u_int.  Use the same
type for the corresponding index in devfs_revoke().

MFC after:	1 week
This commit is contained in:
Pedro F. Giffuni 2016-04-28 02:39:43 +00:00
parent 9119df34df
commit b114da42af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298732

View File

@ -1444,7 +1444,7 @@ devfs_revoke(struct vop_revoke_args *ap)
struct cdev *dev;
struct cdev_priv *cdp;
struct devfs_dirent *de;
int i;
u_int i;
KASSERT((ap->a_flags & REVOKEALL) != 0, ("devfs_revoke !REVOKEALL"));