GError **error)
{
GError *key_file_error = NULL;
- gsize bytes_read;
+ gssize bytes_read;
struct stat stat_buf;
gchar read_buf[4096];
num_keys++;
}
- keys = (gchar **) g_new0 (gchar *, num_keys + 1);
+ keys = g_new0 (gchar *, num_keys + 1);
i = num_keys - 1;
for (tmp = group->key_value_pairs; tmp; tmp = tmp->next)
* list) is always the comment group at the top,
* which we skip
*/
- groups = (gchar **) g_new0 (gchar **, num_groups);
+ groups = g_new0 (gchar *, num_groups);
group_node = g_list_last (key_file->groups);
p = g_utf8_next_char (p);
- if (!*p)
- return FALSE;
-
- p = g_utf8_next_char (p);
-
/* Group name must be non-empty
*/
- if (*p == ']')
+ if (!*p || *p == ']')
return FALSE;
while (*p && *p != ']')