mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: stats uses overflowing counter
Here we need to annotate counter as it starts with UINT64_MAX and overflows to 0 is expected.
This commit is contained in:
parent
8168b5e71d
commit
4dda6d1555
@ -1444,8 +1444,9 @@ static void _stats_walk_next_present(const struct dm_stats *dms,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* advance to next present, non-skipped region or end */
|
/* advance to next present, non-skipped region or end */
|
||||||
while ((*cur_r < UINT64_MAX) &&
|
/* count can start as UINT64_MAX, probably rework to use post++ */
|
||||||
++(*cur_r) <= dms->max_region) {
|
/* coverity[overflow_const] overflow is expected here */
|
||||||
|
while (++(*cur_r) <= dms->max_region) {
|
||||||
cur = &dms->regions[*cur_r];
|
cur = &dms->regions[*cur_r];
|
||||||
if (!_stats_region_present(cur))
|
if (!_stats_region_present(cur))
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user