/pidgin/main: 6dbfcd72998e: Fix a few cases of dead code

Daniel Atallah datallah at pidgin.im
Tue Feb 26 22:34:11 EST 2013


Changeset: 6dbfcd72998e4b5f4d03422dba8a41465fd50168
Author:	 Daniel Atallah <datallah at pidgin.im>
Date:	 2013-02-26 22:34 -0500
Branch:	 release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/6dbfcd72998e

Description:

Fix a few cases of dead code

diffstat:

 libpurple/protocols/jabber/ibb.c      |  4 ----
 libpurple/protocols/jabber/usermood.c |  4 +---
 libpurple/protocols/silc/silc.c       |  2 +-
 3 files changed, 2 insertions(+), 8 deletions(-)

diffs (42 lines):

diff --git a/libpurple/protocols/jabber/ibb.c b/libpurple/protocols/jabber/ibb.c
--- a/libpurple/protocols/jabber/ibb.c
+++ b/libpurple/protocols/jabber/ibb.c
@@ -472,10 +472,6 @@ jabber_ibb_parse(JabberStream *js, const
 				purple_debug_info("jabber", "IBB: calling closed handler\n");
 				sess->closed_cb(sess);
 			}
-
-		} else {
-			/* this should never happen */
-			purple_debug_error("jabber", "Received bogus iq for IBB session\n");
 		}
 	} else if (open) {
 		JabberIq *result;
diff --git a/libpurple/protocols/jabber/usermood.c b/libpurple/protocols/jabber/usermood.c
--- a/libpurple/protocols/jabber/usermood.c
+++ b/libpurple/protocols/jabber/usermood.c
@@ -148,11 +148,9 @@ static void jabber_mood_cb(JabberStream 
 					}
 				}
 			}
-			if (newmood != NULL && moodtext != NULL)
-			   break;
 		}
 		if (newmood != NULL && moodtext != NULL)
-		   break;
+			break;
 	}
 	if (newmood != NULL) {
 		purple_prpl_got_user_status(js->gc->account, from, "mood",
diff --git a/libpurple/protocols/silc/silc.c b/libpurple/protocols/silc/silc.c
--- a/libpurple/protocols/silc/silc.c
+++ b/libpurple/protocols/silc/silc.c
@@ -1798,7 +1798,7 @@ static PurpleCmdRet silcpurple_cmd_cmode
 	}
 
 	silcargs = g_strjoinv(" ", args);
-	silccmd = g_strconcat(cmd, " ", args ? silcargs : NULL, NULL);
+	silccmd = g_strconcat(cmd, " ", silcargs, NULL);
 	g_free(silcargs);
 	if (!silc_client_command_call(sg->client, sg->conn, silccmd)) {
 		g_free(silccmd);



More information about the Commits mailing list