From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS17314 8.43.84.0/22 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, PDS_RDNS_DYNAMIC_FP,RCVD_IN_DNSWL_MED,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 2B26E1F8C6 for ; Tue, 3 Aug 2021 21:29:56 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 13B743853C1B for ; Tue, 3 Aug 2021 21:29:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 13B743853C1B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1628026195; bh=x8F3EP1ehnv4zBdLKJFFMEDpTG5NBuC/4/Vfe7hfMH0=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=SEb4vOvubyqMddJKQ06Wdjv+urhyv+PsSG5PJdh2/8vdrndCeL9h+Rhwd/mTIxp/L LVjlv2RFcagolgXwPlygWiWI0v/luEdh/oWtn2haZni0mZs5OToJtybYCNjuM1TYmh vrWjrFIWQkDZ25n/TyhUO8OrcMCFbTlpMBt8g9zI= Received: from bee.birch.relay.mailchannels.net (bee.birch.relay.mailchannels.net [23.83.209.14]) by sourceware.org (Postfix) with ESMTPS id C57913858C27 for ; Tue, 3 Aug 2021 21:29:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C57913858C27 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 06F451E258D for ; Tue, 3 Aug 2021 21:29:30 +0000 (UTC) Received: from pdx1-sub0-mail-a4.g.dreamhost.com (100-105-161-178.trex.outbound.svc.cluster.local [100.105.161.178]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 87BC71E255D for ; Tue, 3 Aug 2021 21:29:29 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a4.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.105.161.178 (trex/6.3.3); Tue, 03 Aug 2021 21:29:29 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Suffer-Juvenile: 4d5f05e042fd23b3_1628026169772_1005198605 X-MC-Loop-Signature: 1628026169771:4284960304 X-MC-Ingress-Time: 1628026169771 Received: from pdx1-sub0-mail-a4.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a4.g.dreamhost.com (Postfix) with ESMTP id 3B5B08AAAA for ; Tue, 3 Aug 2021 14:29:29 -0700 (PDT) Received: from rhbox.redhat.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a4.g.dreamhost.com (Postfix) with ESMTPSA id 43D5C8AAA8 for ; Tue, 3 Aug 2021 14:29:27 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a4 To: libc-alpha@sourceware.org Subject: [PATCH 0/5] getaddrinfo spaghetti cleanups Date: Wed, 4 Aug 2021 02:59:14 +0530 Message-Id: <20210803212919.3059194-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Siddhesh Poyarekar via Libc-alpha Reply-To: Siddhesh Poyarekar Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org Sender: "Libc-alpha" This series cleans up a bunch of confusing gotos in various functions in getaddrinfo. The gotos jump from one condition to another and in various directions, making code quite hard to read. Siddhesh Poyarekar (5): gaiconf_init: Refactor some bits for readability gai_init: Avoid jumping from if condition to its else counterpart getaddrinfo: Refactor code for readability gaih_inet: Consolidate got_port code gaih_inet: Make process_list label into a function sysdeps/posix/getaddrinfo.c | 1067 ++++++++++++++++++----------------- 1 file changed, 542 insertions(+), 525 deletions(-) --=20 2.31.1