Commit 8cefb291 authored by Michael Natterer's avatar Michael Natterer 😴

app: use g_strcmp0() where strings can be NULL instead of checking manually

parent 6d67ffd6
......@@ -354,7 +354,7 @@ documents_raise_display (GimpDisplay *display,
{
const gchar *uri = gimp_object_get_name (gimp_display_get_image (display));
if (uri && ! strcmp (closure->name, uri))
if (! g_strcmp0 (closure->name, uri))
{
closure->found = TRUE;
gimp_display_shell_present (gimp_display_get_shell (display));
......
......@@ -205,8 +205,7 @@ gimp_object_set_name (GimpObject *object,
{
g_return_if_fail (GIMP_IS_OBJECT (object));
if ((!object->p->name && !name) ||
(object->p->name && name && !strcmp (object->p->name, name)))
if (! g_strcmp0 (object->p->name, name))
return;
gimp_object_name_free (object);
......@@ -233,8 +232,7 @@ gimp_object_set_name_safe (GimpObject *object,
{
g_return_if_fail (GIMP_IS_OBJECT (object));
if ((!object->p->name && !name) ||
(object->p->name && name && !strcmp (object->p->name, name)))
if (! g_strcmp0 (object->p->name, name))
return;
gimp_object_name_free (object);
......
......@@ -419,8 +419,7 @@ gimp_pdb_progress_get_by_callback (GimpPdbProgressClass *klass,
{
GimpPdbProgress *progress = list->data;
if (progress->callback_name &&
strcmp (callback_name, progress->callback_name) == 0)
if (! g_strcmp0 (callback_name, progress->callback_name))
return progress;
}
......
......@@ -566,7 +566,7 @@ gimp_tag_cache_load_text (GMarkupParseContext *context,
current_element = g_markup_parse_context_get_element (context);
if (current_element && strcmp (current_element, "tag") == 0)
if (g_strcmp0 (current_element, "tag") == 0)
{
if (text_len >= sizeof (buffer))
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment