mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 09:10:28 +00:00
tcp bblog: cleanup
Remove redundant checks and improve error checking. Reported by: Coverity Scan CID: 1523780 Reviewed by: rscheff MFC after: 3 days Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44616
This commit is contained in:
parent
aaaa01c0c8
commit
60bc195745
|
@ -421,7 +421,7 @@ static inline void
|
|||
tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t bbpoint)
|
||||
{
|
||||
if ((ls == TCP_LOG_VIA_BBPOINTS) &&
|
||||
(tp->_t_logstate <= TCP_LOG_STATE_OFF)){
|
||||
(tp->_t_logstate == TCP_LOG_STATE_OFF)){
|
||||
/*
|
||||
* We don't allow a BBPOINTS set to override
|
||||
* other types of BB logging set by other means such
|
||||
|
@ -431,11 +431,9 @@ tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t bbpoint)
|
|||
*/
|
||||
tp->_t_logpoint = bbpoint;
|
||||
tp->_t_logstate = ls;
|
||||
} else if (ls != TCP_LOG_VIA_BBPOINTS) {
|
||||
tp->_t_logpoint = 0;
|
||||
if ((ls >= TCP_LOG_STATE_OFF) &&
|
||||
(ls < TCP_LOG_VIA_BBPOINTS))
|
||||
tp->_t_logstate = ls;
|
||||
} else if (ls < TCP_LOG_VIA_BBPOINTS) {
|
||||
tp->_t_logpoint = TCP_BBPOINT_NONE;
|
||||
tp->_t_logstate = ls;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue