changeset 28232:de7f6fd04298

Move this check inside the else condition. The other half of the if statement guarrantees that slpmsg will be non-NULL, this is a very tiny optimization, but it's also cleaner
author Mark Doliner <mark@kingant.net>
date Wed, 12 Aug 2009 23:13:47 +0000
parents 359800ae7d17
children b59aa0c36b2b
files libpurple/protocols/msn/slplink.c
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slplink.c	Wed Aug 12 10:04:54 2009 +0000
+++ b/libpurple/protocols/msn/slplink.c	Wed Aug 12 23:13:47 2009 +0000
@@ -502,7 +502,6 @@
 		g_return_if_reached();
 	}
 
-	slpmsg = NULL;
 	data = msn_message_get_bin_data(msg, &len);
 
 	/*
@@ -566,13 +565,12 @@
 	else
 	{
 		slpmsg = msn_slplink_message_find(slplink, msg->msnslp_header.session_id, msg->msnslp_header.id);
-	}
-
-	if (slpmsg == NULL)
-	{
-		/* Probably the transfer was canceled */
-		purple_debug_error("msn", "Couldn't find slpmsg\n");
-		return;
+		if (slpmsg == NULL)
+		{
+			/* Probably the transfer was canceled */
+			purple_debug_error("msn", "Couldn't find slpmsg\n");
+			return;
+		}
 	}
 
 	if (slpmsg->fp)