[PATCH 4/5] Fix theoretical usage of NULL pointer dereference

[email protected] <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <874oc8sztz.wl%[email protected]>
At Tue, 26 Oct 2010 14:37:43 +0100,
Alasdair G Kergon wrote:
> 
> On Tue, Oct 26, 2010 at 02:59:25PM +0200, Zdenek Kabelac wrote:
> > @@ -97,6 +97,12 @@ int ttree_insert(struct ttree *tt, unsigned int *key, void *data)
> 
> > +	if (!*c) {
> > +		log_error(INTERNAL_ERROR "Insert failed.");
> 
> What am I missing here?
> Isn't that condition you are proposing to add logically impossible to
> trigger?!

Yes, it can't happen, as I said the first time this patch went round.

One thing I'm not clear on is how much benefit we're seeing from the
CLang build?  Kabi, how many genuine bugs did you find when you went
through this process?  If the benefits are real, then we can live with
check like these.  It would be nice if it was clearer that they are
only there to pacify clang, maybe put a conditional compile in so
they're only included with the clang build?

- Joe
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.