[PATCH 2/5] Ensure seg is nonnull

Alasdair G Kergon <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected]>
On Tue, Oct 26, 2010 at 02:59:23PM +0200, Zdenek Kabelac wrote:
> +		if (!seg) {
> +			log_error(INTERNAL_ERROR "Segment is not selected.");

I don't mind assertions like this, but please describe the problem more
accurately in the message.  If this triggers, doesn't it mean we
have a corrupt segment list?  So say that.
"LV %s segment list corrupted: NULL struct lv_segment detected."

But isn't there a missing 'if (lv)' ?

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.