change the KASSERT so it is meaningful, var is unsigned, so even

when it wraps, it's still >= 0...

Reported by:	Coverity
CID:		1017564
This commit is contained in:
John-Mark Gurney 2015-06-19 22:42:26 +00:00
parent d33a1217bd
commit fb17b4c55c

View File

@ -1181,8 +1181,8 @@ crypto_kdone(struct cryptkop *krp)
/* XXX: What if driver is loaded in the meantime? */
if (krp->krp_hid < crypto_drivers_num) {
cap = &crypto_drivers[krp->krp_hid];
KASSERT(cap->cc_koperations > 0, ("cc_koperations == 0"));
cap->cc_koperations--;
KASSERT(cap->cc_koperations >= 0, ("cc_koperations < 0"));
if (cap->cc_flags & CRYPTOCAP_F_CLEANUP)
crypto_remove(cap);
}