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:
parent
d33a1217bd
commit
fb17b4c55c
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user