From fc93f977741f4f32adde7f051a0bd21673d0e94e Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Thu, 14 Oct 2021 03:08:54 +0200 Subject: conf: Reset errno before checking port specifier with strtol(3) Signed-off-by: Stefano Brivio --- conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/conf.c b/conf.c index d0394a4..d347f1d 100644 --- a/conf.c +++ b/conf.c @@ -175,6 +175,7 @@ static int conf_ports(struct ctx *c, char optname, const char *optarg, do { int i, port; + errno = 0; port = strtol(p, &sep, 10); if (sep == p) break; -- cgit v1.2.3