conf: Reset errno before checking port specifier with strtol(3)
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
parent
9f1724ad1e
commit
fc93f97774
1 changed files with 1 additions and 0 deletions
1
conf.c
1
conf.c
|
@ -175,6 +175,7 @@ static int conf_ports(struct ctx *c, char optname, const char *optarg,
|
||||||
do {
|
do {
|
||||||
int i, port;
|
int i, port;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
port = strtol(p, &sep, 10);
|
port = strtol(p, &sep, 10);
|
||||||
if (sep == p)
|
if (sep == p)
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue