From owner-svn-src-head@freebsd.org Fri Feb 24 21:17:57 2017 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 1858FCEB9C7 for ; Fri, 24 Feb 2017 21:17:57 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (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 F09E21D75 for ; Fri, 24 Feb 2017 21:17:56 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: bfda5d48-fad6-11e6-ba57-8bc134ee460a X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id bfda5d48-fad6-11e6-ba57-8bc134ee460a; Fri, 24 Feb 2017 21:18:13 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id v1OLHmYv004348; Fri, 24 Feb 2017 14:17:48 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1487971068.25520.45.camel@freebsd.org> Subject: Re: svn commit: r314189 - head/lib/libcam From: Ian Lepore To: "Ngie Cooper (yaneurabeya)" Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 24 Feb 2017 14:17:48 -0700 In-Reply-To: <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> References: <201702240624.v1O6OdRr094467@repo.freebsd.org> <1487950593.25520.20.camel@freebsd.org> <769272AC-D30C-4C69-B4D3-9805B9FFC28D@gmail.com> Content-Type: text/plain; charset="windows-1251" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 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: Fri, 24 Feb 2017 21:17:57 -0000 On Fri, 2017-02-24 at 13:02 -0800, Ngie Cooper (yaneurabeya) wrote: > > > > On Feb 24, 2017, at 07:36, Ian Lepore wrote: > > > > On Fri, 2017-02-24 at 06:24 +0000, Ngie Cooper wrote: > > > > > > Author: ngie > > > Date: Fri Feb 24 06:24:39 2017 > > > New Revision: 314189 > > > URL: https://svnweb.freebsd.org/changeset/base/314189 > > > > > > Log: > > >   Fix up NULL/'\0' uses and fix 2 derefs after NULL > > > > > >   MFC after: 2 weeks > > >   Reported by: Coverity > > >   CID: 1018898, 1018899 > > >   Differential Revision: https://reviews.freebsd.org/D6142 > > >   Sponsored by: Dell EMC Isilon > > > > > > Modified: > > >   head/lib/libcam/scsi_cmdparse.c > > > > > > Modified: head/lib/libcam/scsi_cmdparse.c > > > ================================================================= > > > ==== > > > ========= > > > --- head/lib/libcam/scsi_cmdparse.c Fri Feb 24 01:39:12 > > > 2017 > > > (r314188) > > > +++ head/lib/libcam/scsi_cmdparse.c Fri Feb 24 06:24:39 > > > 2017 > > > (r314189) > > > @@ -128,14 +128,14 @@ do_buff_decode(u_int8_t *buff, size_t le > > >   *(va_arg(*ap, int *)) = (ARG); \ > > >   assigned++; \ > > >   } \ > > > - field_name[0] = 0; \ > > > + field_name[0] = '\0'; \ > > Is coverity seriously complaining about using 0 instead of > > '\0'?  What > > possible *real* benefit (not just shutting up coverity) does this > > churn > > bring? > Warner made the same comment. > It was actually a combination of issues brought up by Coverity > and coccinelle (badzero.cocci). The forward-NULL CIDs noted were > pointed out by Coverity. The NULL/‘\0’ use issues were pointed out by > coccinelle. > Thanks! > -Ngie Alright.  That answers everything except the actual important question.  So, again: What *real* benefit does this churn bring? -- Ian