# HG changeset patch # User Paul Aurich # Date 1308543253 0 # Node ID 1d657ec53cdb11c14b95843d4c58fe4974ff326e # Parent 84f72590a3199dd5fe8b51dc9b5fbb0778fa0c45 account: Move a normalization outside of the for loop diff -r 84f72590a319 -r 1d657ec53cdb libpurple/account.c --- a/libpurple/account.c Sat Jun 18 11:44:27 2011 +0000 +++ b/libpurple/account.c Mon Jun 20 04:14:13 2011 +0000 @@ -3038,19 +3038,19 @@ 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; }