mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
libdm: check for zero in _nr_areas() (Coverity)
This commit is contained in:
parent
69fa16048a
commit
074b5de771
@ -504,6 +504,9 @@ out:
|
|||||||
|
|
||||||
static uint64_t _nr_areas(uint64_t len, uint64_t step)
|
static uint64_t _nr_areas(uint64_t len, uint64_t step)
|
||||||
{
|
{
|
||||||
|
/* Default is one area. */
|
||||||
|
if (!len || !step)
|
||||||
|
return 1;
|
||||||
/*
|
/*
|
||||||
* drivers/md/dm-stats.c::message_stats_create()
|
* drivers/md/dm-stats.c::message_stats_create()
|
||||||
* A region may be sub-divided into areas with their own counters.
|
* A region may be sub-divided into areas with their own counters.
|
||||||
|
Loading…
Reference in New Issue
Block a user