diff --git a/sys/kern/sys_capability.c b/sys/kern/sys_capability.c index 300f02810d21..8442433aa71c 100644 --- a/sys/kern/sys_capability.c +++ b/sys/kern/sys_capability.c @@ -352,7 +352,7 @@ cap_ioctl_check(struct filedesc *fdp, int fd, u_long cmd) ("%s: invalid fd=%d", __func__, fd)); fdep = fdeget_locked(fdp, fd); - KASSERT(fdep == NULL, + KASSERT(fdep != NULL, ("%s: invalid fd=%d", __func__, fd)); ncmds = fdep->fde_nioctls;