From e391576e637f88ec17365ba3ec0ac0822576f83e Mon Sep 17 00:00:00 2001 From: rwatson Date: Mon, 5 Apr 2004 00:52:05 +0000 Subject: Two missed in previous commit -- compare pointer with NULL rather than using it as a boolean. --- sys/netinet/tcp_subr.c | 4 ++-- sys/netinet/tcp_timewait.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 78c1a0d..5a71d5c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -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; } diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 78c1a0d..5a71d5c 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -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; } -- cgit v1.1