pidgin, im.pidgin.pidgin.next.minor: 3a12ece5: account: Move a normalization outside of...

darkrain42 at pidgin.im darkrain42 at pidgin.im
Mon Jun 20 01:25:42 EDT 2011


----------------------------------------------------------------------
Revision: 3a12ece5b629e6de76faec79315514e70ccb32bb
Parent:   10a19d0da323fdc8c2b315968e383219d8b9101f
Author:   darkrain42 at pidgin.im
Date:     06/20/11 00:14:13
Branch:   im.pidgin.pidgin
Branch:   im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/3a12ece5b629e6de76faec79315514e70ccb32bb

Changelog: 

account: Move a normalization outside of the for loop

Changes against parent 10a19d0da323fdc8c2b315968e383219d8b9101f

  patched  libpurple/account.c

-------------- next part --------------
============================================================
--- libpurple/account.c	225d714d249dc7765a130fc18164aafc44788870
+++ libpurple/account.c	ac86f97fe4ff1a09ed204649bc7eaaa4b50f692b
@@ -3038,19 +3038,19 @@ purple_accounts_find(const char *name, c
 	g_return_val_if_fail(name != NULL, NULL);
 	g_return_val_if_fail(protocol_id != NULL, NULL);
 
+	who = g_strdup(purple_normalize(account, name));
 	for (l = purple_accounts_get_all(); l != NULL; l = l->next) {
 		account = (PurpleAccount *)l->data;
 		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)) {
 			g_free(who);
 			return account;
 		}
-		g_free(who);
 	}
 
+	g_free(who);
 	return NULL;
 }
 


More information about the Commits mailing list