From patchwork Sat Nov 23 19:15:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Tim_R=C3=BChsen?= X-Patchwork-Id: 36157 Received: (qmail 124807 invoked by alias); 23 Nov 2019 19:15:33 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 124724 invoked by uid 89); 23 Nov 2019 19:15:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.1 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.1 spammy=U*tim.ruehsen, tim.ruehsen@gmx.de, sk:tim.rue, sk:timrue X-HELO: mout.gmx.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1574536514; bh=CJohpb9Zbb4HluuF2FK5mN9A52hRi42DJI3nGZQHRD8=; h=X-UI-Sender-Class:To:From:Subject:Date; b=eXm1t733/ipd6Me+q78kutEoEZILeHjkDjjIoUEwbGKPEX73XtREScokXQ5BIX46q UrshsgAI486elHvXeQQypIaMeHpC3OWXOuks+2PTE43NxqycwQ0EJVdJ/7Af0HOVex NkhNeYL1XwZ8GzPdWpK0SYw+KWTcpWcTtnobYhyw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c To: libc-alpha@sourceware.org From: =?UTF-8?Q?Tim_R=c3=bchsen?= Subject: [PATCH] nss: Simplify if expression in getaddrinfo() Message-ID: Date: Sat, 23 Nov 2019 20:15:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.2 MIME-Version: 1.0 Small code cleanup for better readability. From 8184e419b971c801c2e708274e59a189892b5a7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20R=C3=BChsen?= Date: Sat, 23 Nov 2019 19:08:26 +0100 Subject: [PATCH] nss: Simplify if expression in getaddrinfo() * sysdeps/posix/getaddrinfo.c (getaddrinfo): Simplify if expression --- sysdeps/posix/getaddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index ea127877cb..afdcdf0a3b 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -2206,7 +2206,7 @@ getaddrinfo (const char *name, const char *service, { /* If we haven't seen both IPv4 and IPv6 interfaces we can narrow down the search. */ - if ((! seen_ipv4 || ! seen_ipv6) && (seen_ipv4 || seen_ipv6)) + if (seen_ipv4 != seen_ipv6) { local_hints = *hints; local_hints.ai_family = seen_ipv4 ? PF_INET : PF_INET6; -- 2.24.0