changeset 13872:d1da27a099d2

[gaim-migrate @ 16342] Get rid of some unnecessary if !NULL checks committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Mon, 26 Jun 2006 03:52:21 +0000
parents 2be9dfa9569b
children 77a50840d9e2
files src/buddyicon.c
diffstat 1 files changed, 5 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddyicon.c	Mon Jun 26 03:44:39 2006 +0000
+++ b/src/buddyicon.c	Mon Jun 26 03:52:21 2006 +0000
@@ -132,12 +132,8 @@
 	if (icon_cache != NULL)
 		g_hash_table_remove(icon_cache, gaim_buddy_icon_get_username(icon));
 
-	if (icon->username != NULL)
-		g_free(icon->username);
-
-	if (icon->data != NULL)
-		g_free(icon->data);
-
+	g_free(icon->username);
+	g_free(icon->data);
 	GAIM_DBUS_UNREGISTER_POINTER(icon);
 	g_free(icon);
 }
@@ -315,8 +311,7 @@
 	g_return_if_fail(icon     != NULL);
 	g_return_if_fail(username != NULL);
 
-	if (icon->username != NULL)
-		g_free(icon->username);
+	g_free(icon->username);
 
 	icon->username = g_strdup(username);
 }
@@ -326,8 +321,7 @@
 {
 	g_return_if_fail(icon != NULL);
 
-	if (icon->data != NULL)
-		g_free(icon->data);
+	g_free(icon->data);
 
 	if (data != NULL && len > 0)
 	{
@@ -485,8 +479,7 @@
 {
 	g_return_if_fail(dir != NULL);
 
-	if (cache_dir != NULL)
-		g_free(cache_dir);
+	g_free(cache_dir);
 
 	cache_dir = g_strdup(dir);
 }