pidgin: 3b9d07dd: Minor optimization / incorrect use preve..

datallah at pidgin.im datallah at pidgin.im
Thu Feb 18 14:35:42 EST 2010


-----------------------------------------------------------------
Revision: 3b9d07ddf934dc6492290dc4d1dbd61564a548c4
Ancestor: 624bba8bd37445c496620c94bfe6da7da8af2ee4
Author: datallah at pidgin.im
Date: 2010-02-18T16:37:18
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3b9d07ddf934dc6492290dc4d1dbd61564a548c4

Modified files:
        libpurple/account.c

ChangeLog: 

Minor optimization / incorrect use prevention

-------------- next part --------------
============================================================
--- libpurple/account.c	91ad52ee5051f7af5fb40ae8f9213a3ff1995163
+++ libpurple/account.c	fc6101405dcb2d2d858eb7b95e67075c6ffff291
@@ -2744,11 +2744,12 @@ purple_accounts_find(const char *name, c
 	char *who;
 
 	g_return_val_if_fail(name != NULL, NULL);
+	g_return_val_if_fail(protocol_id != NULL, NULL);
 
 	for (l = purple_accounts_get_all(); l != NULL; l = l->next) {
 		account = (PurpleAccount *)l->data;
-		if (protocol_id && !purple_strequal(account->protocol_id, protocol_id))
-		  continue;
+		if (!purple_strequal(account->protocol_id, protocol_id))
+			continue;
 
 		who = g_strdup(purple_normalize(account, name));
 		if (purple_strequal(purple_normalize(account, purple_account_get_username(account)), who)) {


More information about the Commits mailing list