From 47d1788c2e984f99521fd5b31194f96d94bf8a6b Mon Sep 17 00:00:00 2001 From: Konstantin Belousov Date: Tue, 19 Aug 2025 05:57:34 +0300 Subject: [PATCH] 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 d2f679a6782..8d3501197c7 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",