From owner-svn-src-stable@FreeBSD.ORG Fri May 29 11:52:33 2015 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75DCC857; Fri, 29 May 2015 11:52:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49D7A17AD; Fri, 29 May 2015 11:52:33 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4TBqXng011284; Fri, 29 May 2015 11:52:33 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4TBqXgT011283; Fri, 29 May 2015 11:52:33 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201505291152.t4TBqXgT011283@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Fri, 29 May 2015 11:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r283707 - stable/10/sys/netinet X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 May 2015 11:52:33 -0000 Author: tuexen Date: Fri May 29 11:52:32 2015 New Revision: 283707 URL: https://svnweb.freebsd.org/changeset/base/283707 Log: MFC r276009: Don't check twice that inp is not NULL. Reported by: Coverity CID: 748671 Modified: stable/10/sys/netinet/sctputil.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/sctputil.c ============================================================================== --- stable/10/sys/netinet/sctputil.c Fri May 29 11:47:54 2015 (r283706) +++ stable/10/sys/netinet/sctputil.c Fri May 29 11:52:32 2015 (r283707) @@ -1949,7 +1949,7 @@ sctp_timer_start(int t_type, struct sctp * though we use a different timer. We also add the HB timer * PLUS a random jitter. */ - if ((inp == NULL) || (stcb == NULL) || (net == NULL)) { + if ((stcb == NULL) || (net == NULL)) { return; } else { uint32_t rndval; @@ -2004,9 +2004,6 @@ sctp_timer_start(int t_type, struct sctp * nothing needed but the endpoint here ususually about 60 * minutes. */ - if (inp == NULL) { - return; - } tmr = &inp->sctp_ep.signature_change; to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_SIGNATURE]; break; @@ -2023,9 +2020,6 @@ sctp_timer_start(int t_type, struct sctp * timer since that has stopped and we are in the GONE * state. */ - if (inp == NULL) { - return; - } tmr = &inp->sctp_ep.signature_change; to_ticks = MSEC_TO_TICKS(SCTP_INP_KILL_TIMEOUT); break; @@ -2034,10 +2028,7 @@ sctp_timer_start(int t_type, struct sctp * Here we use the value found in the EP for PMTU ususually * about 10 minutes. */ - if ((stcb == NULL) || (inp == NULL)) { - return; - } - if (net == NULL) { + if ((stcb == NULL) || (net == NULL)) { return; } if (net->dest_state & SCTP_ADDR_NO_PMTUD) { @@ -2063,7 +2054,7 @@ sctp_timer_start(int t_type, struct sctp * Here we use the endpoints shutdown guard timer usually * about 3 minutes. */ - if ((inp == NULL) || (stcb == NULL)) { + if (stcb == NULL) { return; } to_ticks = inp->sctp_ep.sctp_timeoutticks[SCTP_TIMER_MAXSHUTDOWN];