Author: tuexen
Date: Sun Jun 14 09:50:00 2020
New Revision: 362173
URL: https://svnweb.freebsd.org/changeset/base/362173

Log:
  Cleanups, no functional change.
  
  MFC after:            1 week

Modified:
  head/sys/netinet/sctp_indata.c
  head/sys/netinet/sctp_output.c
  head/sys/netinet/sctp_ss_functions.c
  head/sys/netinet/sctputil.c

Modified: head/sys/netinet/sctp_indata.c
==============================================================================
--- head/sys/netinet/sctp_indata.c      Sun Jun 14 06:58:58 2020        
(r362172)
+++ head/sys/netinet/sctp_indata.c      Sun Jun 14 09:50:00 2020        
(r362173)
@@ -66,7 +66,7 @@ sctp_add_chk_to_control(struct sctp_queued_to_read *co
     struct sctp_stream_in *strm,
     struct sctp_tcb *stcb,
     struct sctp_association *asoc,
-    struct sctp_tmit_chunk *chk, int lock_held);
+    struct sctp_tmit_chunk *chk, int hold_rlock);
 
 
 void

Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c      Sun Jun 14 06:58:58 2020        
(r362172)
+++ head/sys/netinet/sctp_output.c      Sun Jun 14 09:50:00 2020        
(r362173)
@@ -5118,7 +5118,6 @@ sctp_arethere_unrecognized_parameters(struct mbuf *in_
                                        }
                                }
                                return (op_err);
-                               break;
                        }
                default:
                        /*

Modified: head/sys/netinet/sctp_ss_functions.c
==============================================================================
--- head/sys/netinet/sctp_ss_functions.c        Sun Jun 14 06:58:58 2020        
(r362172)
+++ head/sys/netinet/sctp_ss_functions.c        Sun Jun 14 09:50:00 2020        
(r362173)
@@ -767,8 +767,8 @@ sctp_ss_fb_scheduled(struct sctp_tcb *stcb, struct sct
  */
 static void
 sctp_ss_fcfs_add(struct sctp_tcb *stcb, struct sctp_association *asoc,
-    struct sctp_stream_out *strq, struct sctp_stream_queue_pending *sp,
-    int holds_lock);
+    struct sctp_stream_out *strq SCTP_UNUSED,
+    struct sctp_stream_queue_pending *sp, int holds_lock);
 
 static void
 sctp_ss_fcfs_init(struct sctp_tcb *stcb, struct sctp_association *asoc,

Modified: head/sys/netinet/sctputil.c
==============================================================================
--- head/sys/netinet/sctputil.c Sun Jun 14 06:58:58 2020        (r362172)
+++ head/sys/netinet/sctputil.c Sun Jun 14 09:50:00 2020        (r362173)
@@ -5230,10 +5230,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc
                        if (((struct sockaddr_in *)addr)->sin_addr.s_addr ==
                            laddr->ifa->address.sin.sin_addr.s_addr) {
                                /* found him. */
-                               if (holds_lock == 0) {
-                                       SCTP_INP_RUNLOCK(inp);
-                               }
-                               return (laddr->ifa);
                                break;
                        }
                }
@@ -5243,10 +5239,6 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc
                        if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr,
                            &laddr->ifa->address.sin6)) {
                                /* found him. */
-                               if (holds_lock == 0) {
-                                       SCTP_INP_RUNLOCK(inp);
-                               }
-                               return (laddr->ifa);
                                break;
                        }
                }
@@ -5255,7 +5247,7 @@ sctp_find_ifa_in_ep(struct sctp_inpcb *inp, struct soc
        if (holds_lock == 0) {
                SCTP_INP_RUNLOCK(inp);
        }
-       return (NULL);
+       return (laddr->ifa);
 }
 
 uint32_t
@@ -5332,9 +5324,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t 
                        if (((struct sockaddr_in *)addr)->sin_addr.s_addr ==
                            sctp_ifap->address.sin.sin_addr.s_addr) {
                                /* found him. */
-                               if (holds_lock == 0)
-                                       SCTP_IPI_ADDR_RUNLOCK();
-                               return (sctp_ifap);
                                break;
                        }
                }
@@ -5344,9 +5333,6 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t 
                        if (SCTP6_ARE_ADDR_EQUAL((struct sockaddr_in6 *)addr,
                            &sctp_ifap->address.sin6)) {
                                /* found him. */
-                               if (holds_lock == 0)
-                                       SCTP_IPI_ADDR_RUNLOCK();
-                               return (sctp_ifap);
                                break;
                        }
                }
@@ -5354,7 +5340,7 @@ sctp_find_ifa_by_addr(struct sockaddr *addr, uint32_t 
        }
        if (holds_lock == 0)
                SCTP_IPI_ADDR_RUNLOCK();
-       return (NULL);
+       return (sctp_ifap);
 }
 
 static void
@@ -6930,7 +6916,7 @@ sctp_local_addr_count(struct sctp_tcb *stcb)
 #if defined(INET)
        int ipv4_local_scope, ipv4_addr_legal;
 #endif
-#if defined (INET6)
+#if defined(INET6)
        int local_scope, site_scope, ipv6_addr_legal;
 #endif
        struct sctp_vrf *vrf;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to