summaryrefslogtreecommitdiff
path: root/src/shared/socket-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/socket-util.c')
-rw-r--r--src/shared/socket-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c
index f6ddea3183..53457886e2 100644
--- a/src/shared/socket-util.c
+++ b/src/shared/socket-util.c
@@ -68,7 +68,7 @@ int socket_address_parse(SocketAddress *a, const char *s) {
errno = 0;
if (inet_pton(AF_INET6, n, &a->sockaddr.in6.sin6_addr) <= 0) {
free(n);
- return errno != 0 ? -errno : -EINVAL;
+ return errno > 0 ? -errno : -EINVAL;
}
free(n);