summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2016-07-06 09:04:13 +0100
committerBryn M. Reeves <bmr@redhat.com>2016-07-06 09:04:13 +0100
commit5d3b136d38db40a6d26b8a09e7a4b504fa2f85d1 (patch)
tree038e704ed37934b83aae6262576383a2a14d5675
parent69c721dd68a6ac517d7962f927f3f59f9e05d9c4 (diff)
downloadlvm2-5d3b136d38db40a6d26b8a09e7a4b504fa2f85d1.tar.gz
libdm: restore missing braces in _stats_walk_end_areas
Jumping to the end of the region table must only happen if there are no more present, non-skipped regions, and no group walk is configured to begin.
-rw-r--r--libdm/libdm-stats.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c
index 07503a5dc..057bbcc7b 100644
--- a/libdm/libdm-stats.c
+++ b/libdm/libdm-stats.c
@@ -1479,11 +1479,12 @@ static void _stats_walk_end_areas(const struct dm_stats *dms, uint64_t *flags,
*cur_a = DM_STATS_WALK_REGION;
*cur_r = DM_STATS_REGION_NOT_PRESENT;
_stats_walk_next_present(dms, flags, cur_r, cur_a, cur_g);
- if (!_stats_walk_any_unskipped(dms, flags, cur_r, cur_a))
+ if (!_stats_walk_any_unskipped(dms, flags, cur_r, cur_a)) {
/* no more regions */
*flags &= ~DM_STATS_WALK_REGION;
if (!(*flags & DM_STATS_WALK_GROUP))
*cur_r = dms->max_region;
+ }
}
if (*flags & DM_STATS_WALK_REGION)