svn commit: r271230 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Sun Sep 7 18:05:38 UTC 2014
Author: tuexen
Date: Sun Sep 7 18:05:37 2014
New Revision: 271230
URL: http://svnweb.freebsd.org/changeset/base/271230
Log:
Address warnings generated by the clang analyzer.
MFC after: 1 week
Modified:
head/sys/netinet/sctp_input.c
head/sys/netinet/sctp_output.c
head/sys/netinet/sctp_pcb.c
Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c Sun Sep 7 17:42:32 2014 (r271229)
+++ head/sys/netinet/sctp_input.c Sun Sep 7 18:05:37 2014 (r271230)
@@ -2882,9 +2882,9 @@ sctp_handle_cookie_ack(struct sctp_cooki
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);
Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c Sun Sep 7 17:42:32 2014 (r271229)
+++ head/sys/netinet/sctp_output.c Sun Sep 7 18:05:37 2014 (r271230)
@@ -5921,8 +5921,8 @@ do_a_abort:
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;
Modified: head/sys/netinet/sctp_pcb.c
==============================================================================
--- head/sys/netinet/sctp_pcb.c Sun Sep 7 17:42:32 2014 (r271229)
+++ head/sys/netinet/sctp_pcb.c Sun Sep 7 18:05:37 2014 (r271230)
@@ -6123,7 +6123,6 @@ sctp_load_addresses_from_init(struct sct
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;
More information about the svn-src-head
mailing list