Hoist iterator variable definition outside of for loop

This is compliant with pre-C99 standard.
This commit is contained in:
Mosè Giordano
2021-05-07 12:11:08 +01:00
parent 0fc99afa25
commit fa68804a5b

View File

@ -494,12 +494,13 @@ tweak_preedit (const char *text)
{
GString *s;
guint len;
const char *p;
s = g_string_new ("");
len = g_utf8_strlen (text, -1);
for (const char *p = text; *p; p = g_utf8_next_char (p))
for (p = text; *p; p = g_utf8_next_char (p))
{
gunichar ch = g_utf8_get_char (p);