From e99182dab3093f1645f9e4ff216aa752d7443fb1 Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Thu, 1 Jan 2026 13:47:45 +0000 Subject: Save/restore errno in all safe wrappers --- src/sysdeps/tryipv6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/sysdeps') diff --git a/src/sysdeps/tryipv6.c b/src/sysdeps/tryipv6.c index a1db92e..d7e073e 100644 --- a/src/sysdeps/tryipv6.c +++ b/src/sysdeps/tryipv6.c @@ -22,7 +22,7 @@ int main (void) s = socket(AF_INET6, SOCK_STREAM, 0) ; if (s < 0) return 111 ; do r = connect(s, (struct sockaddr *)&bar, sizeof bar) ; - while ((r == -1) && (errno == EINTR)) ; - if ((r == -1) && (errno == EALREADY)) errno = EINPROGRESS ; + while (r == -1 && errno == EINTR) ; + if (r == -1 && errno == EALREADY) errno = EINPROGRESS ; return 0 ; } -- cgit v1.3.1