pidgin: 781f45c0: It's an error if purple_xfer_new fails, ...

markdoliner at pidgin.im markdoliner at pidgin.im
Fri Nov 14 02:35:23 EST 2008


-----------------------------------------------------------------
Revision: 781f45c0a762515f062e31c965beb9879fb308df
Ancestor: 82713a606d8246d160d73aaea50214755d04aebb
Author: markdoliner at pidgin.im
Date: 2008-11-14T07:23:56
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/781f45c0a762515f062e31c965beb9879fb308df

Modified files:
        libpurple/protocols/msn/msn.c

ChangeLog: 

It's an error if purple_xfer_new fails, so use a g_return_val_if_fail

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c	f8e681f66b852f7e33ea4840e7af340ba7263a21
+++ libpurple/protocols/msn/msn.c	1e9325d2e4fbbf2342b3a4fed6b02bcd9d63973b
@@ -550,21 +550,17 @@ msn_new_xfer(PurpleConnection *gc, const
 msn_new_xfer(PurpleConnection *gc, const char *who)
 {
 	MsnSession *session;
-	MsnSlpLink *slplink;
 	PurpleXfer *xfer;
 
 	session = gc->proto_data;
 
 	xfer = purple_xfer_new(gc->account, PURPLE_XFER_SEND, who);
 
-	if (xfer)
-	{
-		slplink = msn_session_get_slplink(session, who);
+	g_return_val_if_fail(xfer != NULL, NULL);
 
-		xfer->data = slplink;
+	xfer->data = msn_session_get_slplink(session, who);
 
-		purple_xfer_set_init_fnc(xfer, t_msn_xfer_init);
-	}
+	purple_xfer_set_init_fnc(xfer, t_msn_xfer_init);
 
 	return xfer;
 }


More information about the Commits mailing list