git: 47d1788c2e98 - main - libc: mark ai_errlist as const
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Aug 2025 21:26:41 UTC
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",