[lvm-devel] [PATCH 2/5] Ensure seg is nonnull

Alasdair G Kergon agk at redhat.com
Tue Oct 26 13:29:45 UTC 2010


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




More information about the lvm-devel mailing list