From f2f66ef6d243aaf7042bceb07187c568928545c3 Mon Sep 17 00:00:00 2001 From: Michael Tuexen Date: Sun, 28 Jun 2020 11:12:03 +0000 Subject: [PATCH] Don't check ch for not being NULL, since that is true. MFC after: 1 week --- sys/netinet/sctp_input.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 8c5924c5b2c2..eac98c150c86 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -5106,7 +5106,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, break; case SCTP_STREAM_RESET: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_STREAM_RESET\n"); - if (((stcb == NULL) || (ch == NULL) || (chk_length < sizeof(struct sctp_stream_reset_tsn_req)))) { + if ((stcb == NULL) || (chk_length < sizeof(struct sctp_stream_reset_tsn_req))) { /* Its not ours */ *offset = length; return (stcb); @@ -5129,7 +5129,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, return (stcb); } - if ((ch != NULL) && (stcb != NULL) && (netp != NULL) && (*netp != NULL)) { + if ((stcb != NULL) && (netp != NULL) && (*netp != NULL)) { if (stcb->asoc.pktdrop_supported == 0) { goto unknown_chunk; } @@ -5165,8 +5165,7 @@ sctp_process_control(struct mbuf *m, int iphlen, int *offset, int length, goto next_chunk; } got_auth = 1; - if ((ch == NULL) || sctp_handle_auth(stcb, (struct sctp_auth_chunk *)ch, - m, *offset)) { + if (sctp_handle_auth(stcb, (struct sctp_auth_chunk *)ch, m, *offset)) { /* auth HMAC failed so dump the packet */ *offset = length; return (stcb);