Address warnings generated by the clang analyzer.

MFC after: 1 week
This commit is contained in:
tuexen 2014-09-07 18:05:37 +00:00
parent c7b009940d
commit 53f889f7e3
3 changed files with 4 additions and 5 deletions

View File

@ -2882,9 +2882,9 @@ sctp_handle_cookie_ack(struct sctp_cookie_ack_chunk *cp SCTP_UNUSED,
SCTPDBG(SCTP_DEBUG_INPUT2,
"sctp_handle_cookie_ack: handling COOKIE-ACK\n");
if (stcb == NULL)
if ((stcb == NULL) || (net == NULL)) {
return;
}
asoc = &stcb->asoc;
sctp_stop_all_cookie_timers(stcb);

View File

@ -5921,8 +5921,8 @@ sctp_send_initiate_ack(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
parameter_len = (uint16_t) sizeof(struct sctp_paramhdr);
ph = (struct sctp_paramhdr *)(mtod(m, caddr_t)+chunk_len);
ph->param_type = htons(SCTP_HAS_NAT_SUPPORT);
ph->param_length = htons(sizeof(struct sctp_paramhdr));
chunk_len += sizeof(struct sctp_paramhdr);
ph->param_length = htons(parameter_len);
chunk_len += parameter_len;
}
/* And now tell the peer which extensions we support */
num_ext = 0;

View File

@ -6123,7 +6123,6 @@ sctp_load_addresses_from_init(struct sctp_tcb *stcb, struct mbuf *m,
peer_supports_prsctp = 0;
peer_supports_auth = 0;
peer_supports_asconf = 0;
peer_supports_asconf = 0;
peer_supports_reconfig = 0;
peer_supports_nrsack = 0;
peer_supports_pktdrop = 0;