Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 May 2015 12:11:14 +0000 (UTC)
From:      Michael Tuexen <tuexen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r283711 - stable/10/sys/netinet
Message-ID:  <201505291211.t4TCBEPv020512@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tuexen
Date: Fri May 29 12:11:14 2015
New Revision: 283711
URL: https://svnweb.freebsd.org/changeset/base/283711

Log:
  MFC r277033:
  
  Remove dead code.
  
  Reported by:	Coverity
  CID:		748660, 748661

Modified:
  stable/10/sys/netinet/sctp_asconf.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet/sctp_asconf.c
==============================================================================
--- stable/10/sys/netinet/sctp_asconf.c	Fri May 29 12:08:49 2015	(r283710)
+++ stable/10/sys/netinet/sctp_asconf.c	Fri May 29 12:11:14 2015	(r283711)
@@ -1419,7 +1419,6 @@ sctp_asconf_queue_sa_delete(struct sctp_
 {
 	struct sctp_ifa *ifa;
 	struct sctp_asconf_addr *aa, *aa_next;
-	uint32_t vrf_id;
 
 	if (stcb == NULL) {
 		return (-1);
@@ -1451,12 +1450,7 @@ sctp_asconf_queue_sa_delete(struct sctp_
 	}			/* for each aa */
 
 	/* find any existing ifa-- NOTE ifa CAN be allowed to be NULL */
-	if (stcb) {
-		vrf_id = stcb->asoc.vrf_id;
-	} else {
-		vrf_id = SCTP_DEFAULT_VRFID;
-	}
-	ifa = sctp_find_ifa_by_addr(sa, vrf_id, SCTP_ADDR_NOT_LOCKED);
+	ifa = sctp_find_ifa_by_addr(sa, stcb->asoc.vrf_id, SCTP_ADDR_NOT_LOCKED);
 
 	/* adding new request to the queue */
 	SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa),
@@ -2782,7 +2776,6 @@ sctp_process_initack_addresses(struct sc
 	struct sctp_ipv4addr_param addr4_store;
 
 #endif
-	uint32_t vrf_id;
 
 	SCTPDBG(SCTP_DEBUG_ASCONF2, "processing init-ack addresses\n");
 	if (stcb == NULL)	/* Un-needed check for SA */
@@ -2850,12 +2843,7 @@ sctp_process_initack_addresses(struct sc
 		}
 
 		/* see if this address really (still) exists */
-		if (stcb) {
-			vrf_id = stcb->asoc.vrf_id;
-		} else {
-			vrf_id = SCTP_DEFAULT_VRFID;
-		}
-		sctp_ifa = sctp_find_ifa_by_addr(&store.sa, vrf_id,
+		sctp_ifa = sctp_find_ifa_by_addr(&store.sa, stcb->asoc.vrf_id,
 		    SCTP_ADDR_NOT_LOCKED);
 		if (sctp_ifa == NULL) {
 			/* address doesn't exist anymore */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505291211.t4TCBEPv020512>