# HG changeset patch # User Paul Aurich # Date 1259264721 0 # Node ID 90361789d5ac9cc00167c610409d96b3b1ac37e4 # Parent 0e70cbf43934996ed88e8a43fa1fb8af0097ce0b jabber/jingle: Slightly less repitition. diff -r 0e70cbf43934 -r 90361789d5ac libpurple/protocols/jabber/jingle/session.c --- a/libpurple/protocols/jabber/jingle/session.c Tue Nov 24 17:14:59 2009 +0000 +++ b/libpurple/protocols/jabber/jingle/session.c Thu Nov 26 19:45:21 2009 +0000 @@ -360,11 +360,15 @@ JingleSession * jingle_session_find_by_sid(JabberStream *js, const gchar *sid) { + JingleSession *session = NULL; + + if (js->sessions) + session = g_hash_table_lookup(js->sessions, sid); + purple_debug_info("jingle", "find_by_id %s\n", sid); - purple_debug_info("jingle", "lookup: %p\n", (js->sessions) ? - g_hash_table_lookup(js->sessions, sid) : NULL); - return (JingleSession *) (js->sessions) ? - g_hash_table_lookup(js->sessions, sid) : NULL; + purple_debug_info("jingle", "lookup: %p\n", session); + + return session; } #if GLIB_CHECK_VERSION(2,4,0)