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

Alasdair G Kergon <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected]>
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?!

It's not our job to add code just because a particular static analyser
isn't clever enough to understand the logic.

Nack.

Alasdair
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.