From 4cd3dcbbc20d0cd97a87d0e584dd91baea1ff34d Mon Sep 17 00:00:00 2001 From: "Bryn M. Reeves" Date: Mon, 20 Jun 2016 17:12:38 +0100 Subject: [PATCH] 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 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index e89f3d609..dc97346a7 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -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,