summaryrefslogtreecommitdiff
path: root/lib/setlocale-fixes.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:33 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:33 +0100
commit5f59a34ab747dde8ede7357f3431bf06bd6002fe (patch)
tree056a4477fd870d454d5be5868cddab829a47f4d2 /lib/setlocale-fixes.c
parent27dae84ed92f1ef0300263091972338d12e78348 (diff)
New upstream version 1.4.2upstream/1.4.2upstream
Diffstat (limited to 'lib/setlocale-fixes.c')
-rw-r--r--lib/setlocale-fixes.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/lib/setlocale-fixes.c b/lib/setlocale-fixes.c
index caa18633..1ca15f76 100644
--- a/lib/setlocale-fixes.c
+++ b/lib/setlocale-fixes.c
@@ -1,5 +1,5 @@
/* Make the global locale minimally POSIX compliant.
- Copyright (C) 2025 Free Software Foundation, Inc.
+ Copyright (C) 2025-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -109,9 +109,8 @@ fill_lc_all_name (void)
else
{
/* Produce a mixed locale name. */
- size_t i;
- char *q;
- for (i = 0, q = lc_all_name; i < 12; i++)
+ char *q = lc_all_name;
+ for (size_t i = 0; i < 12; i++)
{
const char *p = cat_names[i];
size_t n = strlen (p);
@@ -178,10 +177,9 @@ setlocale_fixed (int category, const char *name)
if (name != NULL)
{
char single_name[256+1];
- int i;
/* Test whether NAME is valid. */
- for (i = 12-1; i >= 0; i--)
+ for (int i = 12-1; i >= 0; i--)
if (extract_single_name (single_name, index_to_cat (i), name) < 0)
return NULL;
/* Now single_name contains the one for the index 0,
@@ -190,7 +188,7 @@ setlocale_fixed (int category, const char *name)
return NULL;
/* Fill lc_cat_name[]. */
- for (i = 12-1; i >= 0; i--)
+ for (int i = 12-1; i >= 0; i--)
{
if (extract_single_name (single_name, index_to_cat (i), name) < 0)
abort ();