diff options
author | Alasdair G Kergon <agk@redhat.com> | 2016-05-23 22:55:13 +0100 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2016-05-23 22:55:13 +0100 |
commit | b896f7de1e6773ce6c17bf29a9123276695f4b60 (patch) | |
tree | 81416375ce783c38667cc210f83470848b2e83f5 /lib/raid | |
parent | 757f7d55082844a17372e4e83c6a95884c2550a8 (diff) | |
download | lvm2-b896f7de1e6773ce6c17bf29a9123276695f4b60.tar.gz |
raid0: Standardise meta_areas checks before access.
Diffstat (limited to 'lib/raid')
-rw-r--r-- | lib/raid/raid.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/raid/raid.c b/lib/raid/raid.c index 4987f9175..e299e1780 100644 --- a/lib/raid/raid.c +++ b/lib/raid/raid.c @@ -33,10 +33,10 @@ static void _raid_display(const struct lv_segment *seg) display_stripe(seg, s, " "); } - if (seg->meta_areas) { + if (seg->meta_areas) for (s = 0; s < seg->area_count; ++s) - log_print(" Raid Metadata LV%2d\t%s", s, seg_metalv(seg, s)->name); - } + if (seg_metalv(seg, s)) + log_print(" Raid Metadata LV%2d\t%s", s, seg_metalv(seg, s)->name); log_print(" "); } |