gtksizegroup: Add explicit braces to avoid dangling else

Otherwise the else after the for loop becomes attached to the wrong if.
This commit is contained in:
Kalev Lember 2013-04-03 00:35:27 +02:00
parent 1391a0be1c
commit 19e6db7997

View File

@ -667,15 +667,22 @@ size_group_start_element (GMarkupParseContext *context,
GSListSubParserData *data = (GSListSubParserData*)user_data;
if (strcmp (element_name, "widget") == 0)
{
for (i = 0; names[i]; i++)
{
if (strcmp (names[i], "name") == 0)
data->items = g_slist_prepend (data->items, g_strdup (values[i]));
}
}
else if (strcmp (element_name, "widgets") == 0)
{
return;
}
else
{
g_warning ("Unsupported type tag for GtkSizeGroup: %s\n",
element_name);
}
}
static const GMarkupParser size_group_parser =