mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-02 01:18:26 +03:00
cleanup: libdm clang warnings
Add some extra clang pointer validation so we do not try deref NULL.
This commit is contained in:
parent
275c9f7e77
commit
fba54ae55e
@ -963,7 +963,9 @@ static void _stats_walk_next(const struct dm_stats *dms, int region,
|
|||||||
if (!dms || !dms->regions)
|
if (!dms || !dms->regions)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cur = &dms->regions[*cur_r];
|
if (!(cur = &dms->regions[*cur_r]))
|
||||||
|
return;
|
||||||
|
|
||||||
present = _stats_region_present(cur);
|
present = _stats_region_present(cur);
|
||||||
|
|
||||||
if (region && present)
|
if (region && present)
|
||||||
@ -1314,7 +1316,7 @@ static int _dm_stats_populate_region(struct dm_stats *dms, uint64_t region_id,
|
|||||||
if (!_stats_bound(dms))
|
if (!_stats_bound(dms))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (!_stats_parse_region(dms, resp, region, region->timescale)) {
|
if (!region || !_stats_parse_region(dms, resp, region, region->timescale)) {
|
||||||
log_error("Could not parse @stats_print message response.");
|
log_error("Could not parse @stats_print message response.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user