From nobody Tue Aug 19 21:26:40 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4c62hc2tYPz62ZR4; Tue, 19 Aug 2025 21:26:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4c62hc26rCz3D11; Tue, 19 Aug 2025 21:26:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755638800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J9VVPcL0g1AIX6C8/5le55zc4s0I8upJ18S7PqvyQWE=; b=ZXJ0++vHXQACZw2R4vh3oDhTwzg/NYkZUgZc4tiHhR7n+iRUGUTC6yg4AqL1s9wv1Kz6wX 9CJbAzEFJ8nGL/J2iAXfwxknNrrNc72idVgjugZdo0pUswan8yM0mzOW7XZxKpbCKA8EzY rVvcSO8o7V7PO46VauUjCwe/Hob0lmkzFOudX3pC1tlTGBNrmr7pfpGnRewRptNIxwfT4h 8sIJ8lnhFItQwR2hKPAwQwRfP7cf4BPQ6LPen1Qp1BKSuSiKB4l4T10v2x444bAacLNSxL nI6r/ZuoY5qSQWqeGm86WSyLDiyDGKipwLPdQnjIp2BYFJwLUBC50CEaei0sPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1755638800; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J9VVPcL0g1AIX6C8/5le55zc4s0I8upJ18S7PqvyQWE=; b=rBsXI0GAKLEPSZuxtmf3fpWvFAsXt/plUfbDWv3Io4kgJYihDKASLW7yMD3DF9mjLnbK2C RvJ6yk/vnQLbuRBgaEYugGI3ft9CX9nAavOMMGWCWayUaqeajn5+ri7RFq2lpUbA/h7kbP mSEMZWKMzoMd2btnRJZFALWGS2Wi/vdwll1T7Jx0jBQZ9rmzgUtAi2gNXBJW6P/yMaynul sabUb/MczxFEs5Dnhmlbjffb96pOX14lK5ZaQiyITag4gHLLmm1/R04Tb6v90B5J0ytqVk uNFMB9ouBo1vjKn6GnIVqtNVk1zEmmA9u1nWOwYeg/1yoTONe6r/WPQk/o+4Dw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1755638800; a=rsa-sha256; cv=none; b=iYSzKKWrQMjqPhHg7FPPqKTMl0Gk1Ar+v9jP0tMyI9bAqwE/kPumykFM1fipwuhBh+fHPF Gv0mt+R56scWsPd1W/jEQONc0PnetylXjS0Si99qHGLKcKwwoo7qwC6wcDM4Ln4Y80vEqc VThaY7j+EByuolhM9Jwx3hmv/SW3p+ywWnUXBu6N1ecZefJKwwlZZbi7JWcAF7GnxmeNRn cprd8nSg+3KhiCqHCFBuIjmFrJDehlS1nfMSIqiWbArh2Mh7bPMgTIb8L1p5Gh6YVmTjhp AIp1BlIUVfiIuw5572h5Pn4TbDMMGuGSEnI8pveka2TIRD/ihrMeoZk1YlMV0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4c62hc1hv6zkS6; Tue, 19 Aug 2025 21:26:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 57JLQexL048351; Tue, 19 Aug 2025 21:26:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57JLQevP048347; Tue, 19 Aug 2025 21:26:40 GMT (envelope-from git) Date: Tue, 19 Aug 2025 21:26:40 GMT Message-Id: <202508192126.57JLQevP048347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 632f7051709d - main - libc: convert ai_errlist array to designated initializers syntax List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 632f7051709da98d4c9e59f11404f00d456b592c Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=632f7051709da98d4c9e59f11404f00d456b592c commit 632f7051709da98d4c9e59f11404f00d456b592c Author: Konstantin Belousov AuthorDate: 2025-08-19 02:55:24 +0000 Commit: Konstantin Belousov CommitDate: 2025-08-19 21:22:26 +0000 libc: convert ai_errlist array to designated initializers syntax Reviewed by: emaste, glebius Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D52010 --- lib/libc/net/gai_strerror.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/libc/net/gai_strerror.c b/lib/libc/net/gai_strerror.c index 0d4303e76a73..d2f679a6782f 100644 --- a/lib/libc/net/gai_strerror.c +++ b/lib/libc/net/gai_strerror.c @@ -46,21 +46,21 @@ * but are or may be used as extensions or in old code. */ static const char *ai_errlist[] = { - "Success", /* 0 */ - "Address family for hostname not supported", /* EAI_ADDRFAMILY */ - "Name could not be resolved at this time", /* EAI_AGAIN */ - "Flags parameter had an invalid value", /* EAI_BADFLAGS */ - "Non-recoverable failure in name resolution", /* EAI_FAIL */ - "Address family not recognized", /* EAI_FAMILY */ - "Memory allocation failure", /* EAI_MEMORY */ - "No address associated with hostname", /* EAI_NODATA*/ - "Name does not resolve", /* EAI_NONAME */ - "Service was not recognized for socket type", /* EAI_SERVICE */ - "Intended socket type was not recognized", /* EAI_SOCKTYPE */ - "System error returned in errno", /* EAI_SYSTEM */ - "Invalid value for hints", /* EAI_BADHINTS */ - "Resolved protocol is unknown", /* EAI_PROTOCOL */ - "Argument buffer overflow" /* EAI_OVERFLOW */ + [0] = "Success", + [EAI_ADDRFAMILY] = "Address family for hostname not supported", + [EAI_AGAIN] = "Name could not be resolved at this time", + [EAI_BADFLAGS] = "Flags parameter had an invalid value", + [EAI_FAIL] = "Non-recoverable failure in name resolution", + [EAI_FAMILY] = "Address family not recognized", + [EAI_MEMORY] = "Memory allocation failure", + [EAI_NODATA] = "No address associated with hostname", + [EAI_NONAME] = "Name does not resolve", + [EAI_SERVICE] = "Service was not recognized for socket type", + [EAI_SOCKTYPE] = "Intended socket type was not recognized", + [EAI_SYSTEM] = "System error returned in errno", + [EAI_BADHINTS] = "Invalid value for hints", + [EAI_PROTOCOL] = "Resolved protocol is unknown", + [EAI_OVERFLOW] = "Argument buffer overflow", }; #if defined(NLS)