[lvm-devel] LVM2 include/.symlinks.in lib/Makefile.in lib/ ...
Zdenek Kabelac
zkabelac at redhat.com
Wed Dec 1 09:07:33 UTC 2010
Dne 30.11.2010 12:53, mornfall at sourceware.org napsal(a):
> CVSROOT: /cvs/lvm2
> Module name: LVM2
> Changes by: mornfall at sourceware.org 2010-11-30 11:53:33
>
>
> if (segtype->ops->target_percent &&
> !segtype->ops->target_percent(&dm->target_state,
> - &percent_range, dm->mem,
> + &percent, dm->mem,
> dm->cmd, seg, params,
> &total_numerator,
> &total_denominator))
> goto_out;
>
> if (first_time) {
> - combined_percent_range = percent_range;
> + *overall_percent = percent;
> first_time = 0;
When we are friends with analyzers now ;) -
if (segtype->ops->target_percent == NULL)
is not defined of fails - 'percent' will contain some garbage.
I assume something like this would help?
- percent_t percent;
+ percent_t percent = PERCENT_INVALID;
Other thing is - how the _combine_percent() is supposed to work in this case?
Maybe you want to goto_out if segtype->ops->target_percent == NULL) as
programming error ?
Zdenek
More information about the lvm-devel
mailing list