Two missed in previous commit -- compare pointer with NULL rather than

using it as a boolean.
This commit is contained in:
rwatson 2004-04-05 00:52:05 +00:00
parent bdbf43dbba
commit e391576e63
2 changed files with 4 additions and 4 deletions

View File

@ -412,7 +412,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
#endif /* INET6 */
ip = ipgen;
if (tp) {
if (tp != NULL) {
inp = tp->t_inpcb;
KASSERT(inp != NULL, ("tcp control block w/o inpcb"));
INP_INFO_WLOCK_ASSERT(&tcbinfo);
@ -1318,7 +1318,7 @@ tcp_drop_syn_sent(inp, errno)
{
struct tcpcb *tp = intotcpcb(inp);
if (tp && tp->t_state == TCPS_SYN_SENT) {
if (tp != NULL && tp->t_state == TCPS_SYN_SENT) {
tcp_drop(tp, errno);
return (struct inpcb *)0;
}

View File

@ -412,7 +412,7 @@ tcp_respond(tp, ipgen, th, m, ack, seq, flags)
#endif /* INET6 */
ip = ipgen;
if (tp) {
if (tp != NULL) {
inp = tp->t_inpcb;
KASSERT(inp != NULL, ("tcp control block w/o inpcb"));
INP_INFO_WLOCK_ASSERT(&tcbinfo);
@ -1318,7 +1318,7 @@ tcp_drop_syn_sent(inp, errno)
{
struct tcpcb *tp = intotcpcb(inp);
if (tp && tp->t_state == TCPS_SYN_SENT) {
if (tp != NULL && tp->t_state == TCPS_SYN_SENT) {
tcp_drop(tp, errno);
return (struct inpcb *)0;
}