From ae08a3a2945b277af81a4cff42c6dcfb26f12fae Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 12 Sep 2014 11:39:31 +0200 Subject: [PATCH] cleanup: skip unused assign Reset of tmp_names is only needed in else{} path. --- lib/metadata/raid_manip.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index b72b83900..c9ac4054e 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -1712,9 +1712,7 @@ try_again: */ for (s = 0; s < raid_seg->area_count; s++) { - tmp_names[s] = NULL; sd = s + raid_seg->area_count; - tmp_names[sd] = NULL; if ((seg_type(raid_seg, s) == AREA_UNASSIGNED) && (seg_metatype(raid_seg, s) == AREA_UNASSIGNED)) { @@ -1745,7 +1743,8 @@ try_again: return 0; } lv_set_hidden(lvl->lv); - } + } else + tmp_names[s] = tmp_names[sd] = NULL; } if (!lv_update_and_reload_origin(lv))