utils: make NULL comparison explicit

This commit is contained in:
Erick Pérez Castellanos
2015-05-25 12:36:53 -04:00
parent 9838c7fa41
commit c256bec634
+16 -9
View File
@@ -661,24 +661,24 @@ uri_get_fields (const gchar *uri,
{
valid = TRUE;
if (schema)
if (schema != NULL)
*schema = g_match_info_fetch (match, 1);
if (host)
if (host != NULL)
*host = g_match_info_fetch (match, 2);
if (path)
if (path != NULL)
*path = g_match_info_fetch (match, 3);
}
else
{
if (schema)
if (schema != NULL)
*schema = NULL;
if (host)
if (host != NULL)
*host = NULL;
if (path)
if (path != NULL)
*path = NULL;
}
@@ -699,8 +699,15 @@ get_source_parent_name_color (GcalManager *manager,
parent_source = gcal_manager_get_source (manager, e_source_get_parent (source));
if (name)
if (name != NULL)
*name = e_source_dup_display_name (parent_source);
if (color)
*color = g_strdup (get_color_name_from_source (parent_source));
if (color != NULL)
{
GdkRGBA c;
get_color_name_from_source (parent_source, &c);
*color = gdk_rgba_to_string (&c);
}
}