diff options
author | rrs <rrs@FreeBSD.org> | 2010-09-05 13:41:45 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2010-09-05 13:41:45 +0000 |
commit | 27478be4a5dbc63a5ecb6c174ab5d18a4fee9622 (patch) | |
tree | 8ec6671afb3ee146fec45bc93973b48d7fe3cd21 /sys/netinet/sctp_input.c | |
parent | dd461c3739e3026d957917c95209144d72f5099e (diff) | |
download | FreeBSD-src-27478be4a5dbc63a5ecb6c174ab5d18a4fee9622.zip FreeBSD-src-27478be4a5dbc63a5ecb6c174ab5d18a4fee9622.tar.gz |
Fix some CLANG warnings. One clang warning is left
due to the fact that its bogus.. nam->sa_family will
not change from AF_INET6 to AF_INET (but clang
thinks it does ;-D)
Diffstat (limited to 'sys/netinet/sctp_input.c')
-rw-r--r-- | sys/netinet/sctp_input.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/netinet/sctp_input.c b/sys/netinet/sctp_input.c index 5da86ff..a7b8e7f 100644 --- a/sys/netinet/sctp_input.c +++ b/sys/netinet/sctp_input.c @@ -535,7 +535,7 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp, struct sockaddr_storage store; struct sockaddr_in *sin; struct sockaddr_in6 *sin6; - struct sctp_nets *r_net; + struct sctp_nets *r_net, *f_net; struct timeval tv; int req_prim = 0; @@ -581,16 +581,16 @@ sctp_handle_heartbeat_ack(struct sctp_heartbeat_chunk *cp, stcb->asoc.primary_destination = r_net; r_net->dest_state &= ~SCTP_ADDR_WAS_PRIMARY; r_net->dest_state &= ~SCTP_ADDR_REQ_PRIMARY; - r_net = TAILQ_FIRST(&stcb->asoc.nets); - if (r_net != stcb->asoc.primary_destination) { + f_net = TAILQ_FIRST(&stcb->asoc.nets); + if (f_net != r_net) { /* * first one on the list is NOT the primary * sctp_cmpaddr() is much more efficent if * the primary is the first on the list, * make it so. */ - TAILQ_REMOVE(&stcb->asoc.nets, stcb->asoc.primary_destination, sctp_next); - TAILQ_INSERT_HEAD(&stcb->asoc.nets, stcb->asoc.primary_destination, sctp_next); + TAILQ_REMOVE(&stcb->asoc.nets, r_net, sctp_next); + TAILQ_INSERT_HEAD(&stcb->asoc.nets, r_net, sctp_next); } req_prim = 1; } @@ -4685,14 +4685,14 @@ process_control_chunks: SCTPDBG(SCTP_DEBUG_INPUT3, "SCTP_NR_SACK\n"); SCTP_STAT_INCR(sctps_recvsacks); - if ((stcb->asoc.sctp_nr_sack_on_off == 0) || - (stcb->asoc.peer_supports_nr_sack == 0)) { - goto unknown_chunk; - } if (stcb == NULL) { SCTPDBG(SCTP_DEBUG_INDATA1, "No stcb when processing NR-SACK chunk\n"); break; } + if ((stcb->asoc.sctp_nr_sack_on_off == 0) || + (stcb->asoc.peer_supports_nr_sack == 0)) { + goto unknown_chunk; + } if (chk_length < sizeof(struct sctp_nr_sack_chunk)) { SCTPDBG(SCTP_DEBUG_INDATA1, "Bad size on NR-SACK chunk, too small\n"); break; |