diff libpurple/protocols/oscar/family_chatnav.c @ 30406:f18b6eb0ed02

Cleanup, basically. Move the icbm snac error handling from oscar.c to family_icbm.c so we don't have to bother we va_args. This is simpler, and gives us the benefit of type checking by the compiler, which will help avoid the crash bug we encountered.
author Mark Doliner <mark@kingant.net>
date Thu, 20 May 2010 02:44:00 +0000
parents 83ae84d4b000
children 553cd883a29a
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_chatnav.c	Thu May 20 01:39:52 2010 +0000
+++ b/libpurple/protocols/oscar/family_chatnav.c	Thu May 20 02:44:00 2010 +0000
@@ -37,7 +37,8 @@
 	guint16 error, chatnav_error;
 	GSList *tlvlist;
 
-	if (!(snac2 = aim_remsnac(od, snac->id))) {
+	snac2 = aim_remsnac(od, snac->id);
+	if (!snac2) {
 		purple_debug_warning("oscar", "chatnav error: received response to unknown request (%08x)\n", snac->id);
 		return 0;
 	}
@@ -67,8 +68,7 @@
 		ret = 1;
 	}
 
-	if (snac2)
-		g_free(snac2->data);
+	g_free(snac2->data);
 	g_free(snac2);
 
 	return ret;