1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

cleanup: gcc warning

One more:

metadata/thin_manip.c:503: warning: declaration of "snapshot_count" shadows a global declaration
This commit is contained in:
Peter Rajnoha 2014-08-15 15:43:42 +02:00
parent 8e449ebd63
commit 8af2309231

View File

@ -500,13 +500,13 @@ const char *get_pool_discards_name(thin_discards_t discards)
return "unknown"; return "unknown";
} }
int lv_is_thin_origin(const struct logical_volume *lv, unsigned int *snapshot_count) int lv_is_thin_origin(const struct logical_volume *lv, unsigned int *snap_count)
{ {
struct seg_list *segl; struct seg_list *segl;
int r = 0; int r = 0;
if (snapshot_count) if (snap_count)
*snapshot_count = 0; *snap_count = 0;
if (!lv_is_thin_volume(lv) || if (!lv_is_thin_volume(lv) ||
dm_list_empty(&lv->segs_using_this_lv)) dm_list_empty(&lv->segs_using_this_lv))
@ -515,8 +515,8 @@ int lv_is_thin_origin(const struct logical_volume *lv, unsigned int *snapshot_co
dm_list_iterate_items(segl, &lv->segs_using_this_lv) { dm_list_iterate_items(segl, &lv->segs_using_this_lv) {
if (segl->seg->origin == lv) { if (segl->seg->origin == lv) {
r = 1; r = 1;
if (snapshot_count) if (snap_count)
(*snapshot_count)++; (*snap_count)++;
else else
/* not interested in number of snapshots */ /* not interested in number of snapshots */
break; break;