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
MFC after:		3 days
Sponsored by:		Netflix, Inc.
Differential Revision:	https://reviews.freebsd.org/D44527
This commit is contained in:
Michael Tuexen 2024-04-01 21:51:59 +02:00
parent dd286b0dc1
commit b600644fdd

View file

@ -759,7 +759,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 {
/*