diff src/pounce.c @ 14035:8bda65b88e49

[gaim-migrate @ 16638] A bunch of small changes. Mostly remove "if not null" checks before calling g_free, g_list_free, g_slist_free and g_strdup. Also use g_list_foreach() to call g_free to free strings in an array. And some whitespace changes here and there. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 05 Aug 2006 08:27:39 +0000
parents a9ff4499d9ce
children
line wrap: on
line diff
--- a/src/pounce.c	Sat Aug 05 05:42:28 2006 +0000
+++ b/src/pounce.c	Sat Aug 05 08:27:39 2006 +0000
@@ -521,8 +521,7 @@
 		data->account_name = NULL;
 	}
 
-	if (buffer != NULL)
-		g_free(buffer);
+	g_free(buffer);
 }
 
 static void
@@ -728,8 +727,7 @@
 	g_return_if_fail(pouncee != NULL);
 
 	g_free(pounce->pouncee);
-
-	pounce->pouncee = (pouncee == NULL ? NULL : g_strdup(pouncee));
+	pounce->pouncee = g_strdup(pouncee);
 
 	schedule_pounces_save();
 }
@@ -926,7 +924,7 @@
 			!gaim_utf8_strcasecmp(gaim_normalize(pouncer, gaim_pounce_get_pouncee(pounce)),
 								  norm_pouncee) &&
 			(pounce->options == GAIM_POUNCE_OPTION_NONE ||
-			 (pounce->options & GAIM_POUNCE_OPTION_AWAY && 
+			 (pounce->options & GAIM_POUNCE_OPTION_AWAY &&
 			  !gaim_presence_is_available(presence))))
 		{
 			handler = g_hash_table_lookup(pounce_handlers, pounce->ui_type);