1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-02-20 15:10:37 -08:00

Restrict loop variable scope in xpm_str_to_color_key

* src/image.c (xpm_str_to_color_key): Restrict scope of
loop variable.
This commit is contained in:
Stefan Kangas 2024-07-12 02:16:47 +02:00
parent 6b2f51633e
commit 72ba45e274

View file

@ -6249,9 +6249,7 @@ static const char xpm_color_key_strings[][4] = {"s", "m", "g4", "g", "c"};
static int
xpm_str_to_color_key (const char *s)
{
int i;
for (i = 0; i < ARRAYELTS (xpm_color_key_strings); i++)
for (int i = 0; i < ARRAYELTS (xpm_color_key_strings); i++)
if (strcmp (xpm_color_key_strings[i], s) == 0)
return i;
return -1;