In message <201603020340.u223ehi1055...@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 <cy.schub...@komquats.com> or <cy.schub...@cschubert.com> FreeBSD UNIX: <c...@freebsd.org> Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few. _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"