mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
lvmpolld: zero errno in before strtoul call
Testing errno value without explicitly setting to zero in before the strtoul call may lead to unexpected failures.
This commit is contained in:
parent
a72a805896
commit
c069aff21b
@ -749,6 +749,7 @@ static int process_timeout_arg(const char *str, unsigned *max_timeouts)
|
||||
char *endptr;
|
||||
unsigned long l;
|
||||
|
||||
errno = 0;
|
||||
l = strtoul(str, &endptr, 10);
|
||||
if (errno || *endptr || l >= UINT_MAX)
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user