master - libdm: rename 'region' to 'skip_region' in _stats_walk_next
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=728949c7bb2ad9151b31a8d7001fb4358deeb170 Commit: 728949c7bb2ad9151b31a8d7001fb4358deeb170 Parent: 9420f8248582fb38afd662131aa28bec22793705 Author: Bryn M. Reeves <[email protected]> AuthorDate: Mon Jun 20 17:12:38 2016 +0100 Committer: Bryn M. Reeves <[email protected]> CommitterDate: Tue Jul 5 19:29:50 2016 +0100
libdm: rename 'region' to 'skip_region' in _stats_walk_next
In libdm-stats.c 'region' usually refers to a 'struct region*'. Rename the argument to _stats_walk_start to avoid confusion.
--- libdm/libdm-stats.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-)
libdm/libdm-stats.c +3 -4
@@ -1003,7 +1003,7 @@ bad:return 0 ; } -static void _stats_walk_next (const struct dm_stats *dms,int region, +static void _stats_walk_next (const struct dm_stats *dms,int skip_region,uint64_t *cur_r,uint64_t *cur_a) {struct dm_stats_region *cur;
@@ -1015,17 +1015,16 @@ static void _stats_walk_next(const struct dm_stats *dms, int region, cur = dms->regions + *cur_r; present =_stats_region_present (cur); -if (region && present) +if (skip_region && present) *cur_a =_nr_areas_region (cur); -if (region || !present || ++(*cur_a) ==_nr_areas_region (cur)) { +if (skip_region || !present || ++(*cur_a) ==_nr_areas_region (cur)) { *cur_a =0 ;while (!dm_stats_region_present (dms, ++(*cur_r)) && *cur_r < dms->max_region) ;/* keep walking until a present region is found * or the end of the table is reached. */ } - } static void _stats_walk_start(const struct dm_stats *dms,