mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
dmstats: check for zero in _nr_areas_from_step() (Coverity)
This commit is contained in:
parent
b01e9651b0
commit
69fa16048a
@ -4434,6 +4434,10 @@ static int _size_from_string(char *argptr, uint64_t *size, const char *name)
|
||||
*/
|
||||
static uint64_t _nr_areas_from_step(uint64_t len, int64_t step)
|
||||
{
|
||||
/* Default is one area. */
|
||||
if (!step || !len)
|
||||
return 1;
|
||||
|
||||
/* --areas */
|
||||
if (step < 0)
|
||||
return (uint64_t)(-step);
|
||||
|
Loading…
x
Reference in New Issue
Block a user