# HG changeset patch # User Stu Tomlinson # Date 1193404969 0 # Node ID 3f8b32a4786cd81e82e816838d964ea51a65adf4 # Parent f710e48fbe1b57fa5c0f6f33800343a5a53352b3 Fix this warning: user.c: In function 'msim_store_user_info_each': user.c:214: warning: ISO C90 forbids mixed declarations and code diff -r f710e48fbe1b -r 3f8b32a4786c libpurple/protocols/myspace/user.c --- a/libpurple/protocols/myspace/user.c Fri Oct 26 05:24:14 2007 +0000 +++ b/libpurple/protocols/myspace/user.c Fri Oct 26 13:22:49 2007 +0000 @@ -203,14 +203,6 @@ /* Ignore because PurpleBuddy knows this already */ g_free(value_str); } else if (g_str_equal(key_str, "ImageURL") || g_str_equal(key_str, "AvatarURL")) { - if (user->temporary_user) { - /* This user will be destroyed soon; don't try to look up its image or avatar, - * since that won't return immediately and we will end up accessing freed data. - */ - g_free(value_str); - return; - } - const gchar *previous_url; if (user->temporary_user) { @@ -220,7 +212,15 @@ g_free(value_str); return; } - + + if (user->temporary_user) { + /* This user will be destroyed soon; don't try to look up its image or avatar, + * since that won't return immediately and we will end up accessing freed data. + */ + g_free(value_str); + return; + } + g_free(user->image_url); user->image_url = value_str; @@ -233,7 +233,7 @@ NULL, 0, NULL); return; } - + /* TODO: use ETag for checksum */ previous_url = purple_buddy_icons_get_checksum_for_user(user->buddy);