mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
gkeyfile: Remove some redundant checks
`g_key_file_parse_key_value_pair()` checks that both of these are non-NULL on entry, and they can’t be modified between then and here. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
parent
f471afb646
commit
655e2bac33
@ -1406,9 +1406,11 @@ g_key_file_parse_key_value_pair (GKeyFile *key_file,
|
||||
|
||||
g_warn_if_fail (key_file->start_group != NULL);
|
||||
|
||||
if (key_file->current_group
|
||||
&& key_file->current_group->name
|
||||
&& key_file->start_group == key_file->current_group
|
||||
/* Checked on entry to this function */
|
||||
g_assert (key_file->current_group != NULL);
|
||||
g_assert (key_file->current_group->name != NULL);
|
||||
|
||||
if (key_file->start_group == key_file->current_group
|
||||
&& strcmp (key, "Encoding") == 0)
|
||||
{
|
||||
if (value_len != strlen ("UTF-8") ||
|
||||
|
Loading…
Reference in New Issue
Block a user