Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2006 07:37:23 +1100
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Tom Rhodes <trhodes@freebsd.org>
Cc:        cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org
Subject:   Re: cvs commit: src/sys/nfsserver nfs_serv.c
Message-ID:  <20060121203723.GT25397@cirb503493.alcatel.com.au>
In-Reply-To: <200601211210.k0LCAXYl069896@repoman.freebsd.org>
References:  <200601211210.k0LCAXYl069896@repoman.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 2006-Jan-21 12:10:33 +0000, Tom Rhodes wrote:
>trhodes     2006-01-21 12:10:33 UTC
>
>  FreeBSD src repository
>
>  Modified files:
>    sys/nfsserver        nfs_serv.c 
>  Log:
>  Remove some dead code.
>  
>  Found with:     Coverity Prevent(tm)

I'll put my $0.02 in and agree with Stefan Farfeleder.  (Luckily, in
this case, the notorious NFS macros are not involved).  The comments
on nfs_namei() state that dirp can be returned not-NULL even if an
error occurs and a check of the code paths in nfs_namei() indicates
that this is correct.  Can you please re-evaluate your change.

If (as I suspect), this is actually an incorrect report from Coverity,
we should probably report it back to them to investigate.

IMHO, as a general rule, I would suggest that dead code that does not
trivially resolve to "if (0)" should be replaced by a KASSERT(9) so
that if the code path isn't totally dead, we have some chance of
finding out about it.

Not to pick on Tom, but I've noticed a lot of Coverity fixes being
applied.  I would expect that Coverity reports would be validated in
the same way any any other bug reports (even if that doesn mean
wading through NFS's maze of twisty large macros).

-- 
Peter Jeremy



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060121203723.GT25397>