Date: Fri, 4 Jun 2010 15:40:02 +0100 (BST) From: Robert Watson <rwatson@FreeBSD.org> To: Edward Tomasz Napierala <trasz@FreeBSD.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r208779 - head/sys/kern Message-ID: <alpine.BSF.2.00.1006041539180.17149@fledge.watson.org> In-Reply-To: <201006031341.o53DftKm094269@svn.freebsd.org> References: <201006031341.o53DftKm094269@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 3 Jun 2010, Edward Tomasz Napierala wrote: > Author: trasz > Date: Thu Jun 3 13:41:55 2010 > New Revision: 208779 > URL: http://svn.freebsd.org/changeset/base/208779 > > Log: > The acl_cnt field is unsigned; no point in checking if it's >= 0. I'd originally left these checks in despite the Coverity warnings to make the code robust against developer changes that might include making acl_cnt signed. I'd prefer to put a compile-time assertion in, needless to say, and recommend that, since they've been removed, we add one. Robert > > Found with: Coverity Prevent > CID: 3683 > > Modified: > head/sys/kern/subr_acl_nfs4.c > > Modified: head/sys/kern/subr_acl_nfs4.c > ============================================================================== > --- head/sys/kern/subr_acl_nfs4.c Thu Jun 3 13:04:56 2010 (r208778) > +++ head/sys/kern/subr_acl_nfs4.c Thu Jun 3 13:41:55 2010 (r208779) > @@ -342,7 +342,6 @@ acl_nfs4_sync_acl_from_mode(struct acl * > const int WRITE = 02; > const int EXEC = 01; > > - KASSERT(aclp->acl_cnt >= 0, ("aclp->acl_cnt >= 0")); > KASSERT(aclp->acl_cnt <= ACL_MAX_ENTRIES, > ("aclp->acl_cnt <= ACL_MAX_ENTRIES")); > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1006041539180.17149>