mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 22:02:58 -04:00
tcp hpts: improve consistency
The target_slot argument of max_slots_available() can be NULL. Therefore, check for this in all places. Right now, all callers provide non-NULL pointer. Reported by: Coverity Scan CID: 1527732 Reviewed by: rrs Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44527 (cherry picked from commit b600644fdd6cefb1b90d76fdd5aa595946611a7d)
This commit is contained in:
parent
fbc8dfd0ed
commit
8375db082c
1 changed files with 2 additions and 1 deletions
|
|
@ -758,7 +758,8 @@ max_slots_available(struct tcp_hpts_entry *hpts, uint32_t wheel_slot, uint32_t *
|
|||
* "0".
|
||||
*/
|
||||
counter_u64_add(combined_wheel_wrap, 1);
|
||||
*target_slot = hpts->p_nxt_slot;
|
||||
if (target_slot)
|
||||
*target_slot = hpts->p_nxt_slot;
|
||||
return (0);
|
||||
} else {
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue