1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

coverity: eliminate DEADCODE

Coverity notice this cannot be NULL: cur = &dms->regions[*cur_r]
so avoid NULL checking and simplify form.
This commit is contained in:
Zdenek Kabelac 2016-03-01 13:58:15 +01:00
parent 8173c2ff9a
commit 36d0dcef38

View File

@ -957,15 +957,13 @@ bad:
static void _stats_walk_next(const struct dm_stats *dms, int region,
uint64_t *cur_r, uint64_t *cur_a)
{
struct dm_stats_region *cur = NULL;
struct dm_stats_region *cur;
int present;
if (!dms || !dms->regions)
return;
if (!(cur = &dms->regions[*cur_r]))
return;
cur = dms->regions + *cur_r;
present = _stats_region_present(cur);
if (region && present)