Module Name:    src
Committed By:   riastradh
Date:           Fri Mar 28 23:30:34 UTC 2025

Modified Files:
        src/tests/lib/libc/gen: t_ctype.c

Log Message:
t_ctype: More const is more better!

No functional change intended -- we never intended to write to this
array anyway.

PR lib/58208: ctype(3) provides poor runtime feedback of abuse


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/tests/lib/libc/gen/t_ctype.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libc/gen/t_ctype.c
diff -u src/tests/lib/libc/gen/t_ctype.c:1.7 src/tests/lib/libc/gen/t_ctype.c:1.8
--- src/tests/lib/libc/gen/t_ctype.c:1.7	Fri Mar 28 23:01:51 2025
+++ src/tests/lib/libc/gen/t_ctype.c	Fri Mar 28 23:30:34 2025
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ctype.c,v 1.7 2025/03/28 23:01:51 riastradh Exp $	*/
+/*	$NetBSD: t_ctype.c,v 1.8 2025/03/28 23:30:34 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2025 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ctype.c,v 1.7 2025/03/28 23:01:51 riastradh Exp $");
+__RCSID("$NetBSD: t_ctype.c,v 1.8 2025/03/28 23:30:34 riastradh Exp $");
 
 #include <atf-c.h>
 #include <ctype.h>
@@ -45,7 +45,7 @@ enum { CHAR_UNSIGNED = 1 };
 enum { CHAR_UNSIGNED = 0 };
 #endif
 
-static const char *locales[] = { "C.UTF-8", "fr_FR.ISO8859-1", "C" };
+static const char *const locales[] = { "C.UTF-8", "fr_FR.ISO8859-1", "C" };
 
 static int isalpha_wrapper(int ch) { return isalpha(ch); }
 static int isupper_wrapper(int ch) { return isupper(ch); }

Reply via email to