Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Aug 2025 21:26:41 GMT
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 47d1788c2e98 - main - libc: mark ai_errlist as const
Message-ID:  <202508192126.57JLQfpT048382@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=47d1788c2e984f99521fd5b31194f96d94bf8a6b

commit 47d1788c2e984f99521fd5b31194f96d94bf8a6b
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-08-19 02:57:34 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-08-19 21:22:30 +0000

    libc: mark ai_errlist as const
    
    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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/net/gai_strerror.c b/lib/libc/net/gai_strerror.c
index d2f679a6782f..8d3501197c73 100644
--- a/lib/libc/net/gai_strerror.c
+++ b/lib/libc/net/gai_strerror.c
@@ -45,7 +45,7 @@
  * Entries EAI_ADDRFAMILY (1) and EAI_NODATA (7) were omitted from RFC 3493,
  * but are or may be used as extensions or in old code.
  */
-static const char *ai_errlist[] = {
+static const char *const ai_errlist[] = {
 	[0] =			"Success",
 	[EAI_ADDRFAMILY] =	"Address family for hostname not supported",
 	[EAI_AGAIN] =		"Name could not be resolved at this time",



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202508192126.57JLQfpT048382>