From owner-svn-src-head@freebsd.org Wed Mar 2 04:12:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1E48AC0C3E; Wed, 2 Mar 2016 04:12:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8B440182A; Wed, 2 Mar 2016 04:12:13 +0000 (UTC) (envelope-from cy.schubert@komquats.com) Received: from spqr.komquats.com ([96.50.22.10]) by shaw.ca with SMTP id ay8uaj7vPKTIZay8vawR9n; Tue, 01 Mar 2016 21:12:11 -0700 X-Authority-Analysis: v=2.1 cv=WIDfJiYR c=1 sm=1 tr=0 a=jvE2nwUzI0ECrNeyr98KWA==:117 a=jvE2nwUzI0ECrNeyr98KWA==:17 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=kj9zAlcOel0A:10 a=7OsogOcEt9IA:10 a=pkK9A6EYAAAA:8 a=6I5d2MoRAAAA:8 a=BWvPGDcYAAAA:8 a=YxBL1-UpAAAA:8 a=FL7cRUw1dwXGNDBT_f0A:9 a=CjuIK1q_8ugA:10 Received: from slippy.cwsent.com (slippy8 [10.2.2.6]) by spqr.komquats.com (Postfix) with ESMTP id E4E0B13777; Tue, 1 Mar 2016 20:12:07 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id u224BnPk005135; Tue, 1 Mar 2016 20:11:49 -0800 (PST) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201603020411.u224BnPk005135@slippy.cwsent.com> X-Mailer: exmh version 2.8.0 04/21/2012 with nmh-1.6 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Don Lewis cc: cy@FreeBSD.org, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r296299 - head/sys/contrib/ipfilter/netinet In-Reply-To: Message from Don Lewis of "Tue, 01 Mar 2016 19:40:16 -0800." <201603020340.u223eHI1055157@gw.catspoiler.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 01 Mar 2016 20:11:49 -0800 X-CMAE-Envelope: MS4wfO2LgSQPjdL7Ikcae6hXMZaEeD4eTncCwZ0MpYlTJQXdr3sbsbF3QKzv+ljlw9AzCyETEYm8jSaCNOPo7Cbzu7VuywEmlhEnraliJoUWpqluPLmW4M+7 aXXtseitjmVGhBCmaeTNNKkeDiFsC7u7q1xIF92Wn92zZ4gHJIr05sThbnihSrpTlECRcx8VJK2120V85q7Jzt8sEkoh9gOqw93tkL2nd1iuvuEfJ5/q+gMO 0vc6+yIg7J64WSd5UCyZCF5Zmfp8+S3GOQfA+2enyjLhY360UlREGsgluVYytRJDFSjALOk2NL9Z3N7LieTqNQ== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Mar 2016 04:12:14 -0000 In message <201603020340.u223eHI1055157@gw.catspoiler.org>, Don Lewis writes: > On 2 Mar, Cy Schubert wrote: > > Author: cy > > Date: Wed Mar 2 03:28:57 2016 > > New Revision: 296299 > > URL: https://svnweb.freebsd.org/changeset/base/296299 > > > > Log: > > Remove redundant NULL pointer comparison. > > > > Reported by: PVS-Studio (V595) in D5245 > > Differential Revision: D5245 > > > > Modified: > > head/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c > > > > Modified: head/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c > > =========================================================================== > === > > --- head/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c Wed Mar 2 03:26:56 201 > 6 (r296298) > > +++ head/sys/contrib/ipfilter/netinet/ip_ftp_pxy.c Wed Mar 2 03:28:57 201 > 6 (r296299) > > @@ -1951,10 +1951,6 @@ ipf_p_ftp_epsv(softf, fin, ip, nat, ftp, > > ap += *s++ - '0'; > > } > > > > - if (!s) { > > - return 0; > > -} > > - > > if (*s == '|') > > s++; > > if (*s == ')') > > > > I wonder if that test was meant to be: > if (!*s) { > especially since hitting the end of the string terminates the preceeding > loop? > The string is terminated by, if ((*s != '\r') || (*(s + 1) != '\n')) { return 0; } at line 1963. -- Cheers, Cy Schubert or FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.