[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [lvm-devel] [PATCH 07/14] Refactor and add code for (lv) 'mirror_log' get function.



On Mon, 2010-10-11 at 20:29 +0200, Petr Rockai wrote:
> Dave Wysochanski <dwysocha redhat com> writes:
> 
> > Signed-off-by: Dave Wysochanski <dwysocha redhat com>
> Reviewed-By: Petr Rockai <prockai redhat com>
> 
> > +		name = seg->log_lv->name;
> > +	}
> > +	if (name)
> > +		return dm_pool_strndup(mem, name, strlen(name) + 1);
> > +	return NULL;
> > +}
> strndup & unnecessary temporary again
> 

Fixed.

> > -		if (!seg_is_mirrored(seg) || !seg->log_lv)
> > -			continue;
> > -		return dm_report_field_string(rh, field,
> > -					      (const char **) &seg->log_lv->name);
> > -	}
> > +	name = lv_mirror_log_dup(mem, lv);
> > +	if (name)
> > +		return dm_report_field_string(rh, field, &name);
> >  
> >  	dm_report_field_set_value(field, "", NULL);
> >  	return 1;
> 
> OK. Your other patches use if ((name = ...)) style, maybe use it here as
> well? (Or change the others to use this style instead?)
> 

Done.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]