mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01:00
gkeyfile: Remove dead code and unused string literals
In all these functions, group_name is guaranteed to be non-NULL by the function preconditions, so there is no need to handle it as NULL when building error messages. Remove some unnecessary string literals as a result. Coverity CID: 1325438–1325441
This commit is contained in:
parent
456e02f280
commit
58ec667480
@ -1546,7 +1546,7 @@ g_key_file_get_keys (GKeyFile *key_file,
|
||||
g_set_error (error, G_KEY_FILE_ERROR,
|
||||
G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
|
||||
_("Key file does not have group '%s'"),
|
||||
group_name ? group_name : "(null)");
|
||||
group_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -1719,7 +1719,7 @@ g_key_file_get_value (GKeyFile *key_file,
|
||||
g_set_error (error, G_KEY_FILE_ERROR,
|
||||
G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
|
||||
_("Key file does not have group '%s'"),
|
||||
group_name ? group_name : "(null)");
|
||||
group_name);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@ -3564,7 +3564,7 @@ g_key_file_has_key_full (GKeyFile *key_file,
|
||||
g_set_error (error, G_KEY_FILE_ERROR,
|
||||
G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
|
||||
_("Key file does not have group '%s'"),
|
||||
group_name ? group_name : "(null)");
|
||||
group_name);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
@ -3860,7 +3860,7 @@ g_key_file_remove_key (GKeyFile *key_file,
|
||||
g_set_error (error, G_KEY_FILE_ERROR,
|
||||
G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
|
||||
_("Key file does not have group '%s'"),
|
||||
group_name ? group_name : "(null)");
|
||||
group_name);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user