aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2021-10-14 03:08:54 +0200
committerStefano Brivio <sbrivio@redhat.com>2021-10-14 13:18:50 +0200
commitfc93f977741f4f32adde7f051a0bd21673d0e94e (patch)
tree3f1bc6fe11af8d1bf13dd0ecfa095b66ec88cf51
parent9f1724ad1e85eac0c64619576d8dfb832e1a688b (diff)
downloadpasst-fc93f977741f4f32adde7f051a0bd21673d0e94e.tar
passt-fc93f977741f4f32adde7f051a0bd21673d0e94e.tar.gz
passt-fc93f977741f4f32adde7f051a0bd21673d0e94e.tar.bz2
passt-fc93f977741f4f32adde7f051a0bd21673d0e94e.tar.lz
passt-fc93f977741f4f32adde7f051a0bd21673d0e94e.tar.xz
passt-fc93f977741f4f32adde7f051a0bd21673d0e94e.tar.zst
passt-fc93f977741f4f32adde7f051a0bd21673d0e94e.zip
conf: Reset errno before checking port specifier with strtol(3)
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r--conf.c1
1 files changed, 1 insertions, 0 deletions
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;