diff options
author | Shlomi Fish <shlomif@shlomifish.org> | 2018-11-22 11:25:59 +0200 |
---|---|---|
committer | Shlomi Fish <shlomif@shlomifish.org> | 2018-11-22 11:25:59 +0200 |
commit | 245d118c6f16d48d9ae998ec2c759dae4455fe15 (patch) | |
tree | 5ce75907fdab3676b472489764d53d892641c52f | |
parent | 18877007c29f9f1eb8f5238ac0c9485c605544e0 (diff) | |
download | pidgin-245d118c6f16d48d9ae998ec2c759dae4455fe15.tar.gz |
Fix indentation into tabs, and make truthiness of gint explicit.
See the comments at https://bitbucket.org/pidgin/main/pull-requests/428/sort-the-facebook-contacts-by-name-alias/diff .
-rw-r--r-- | libpurple/protocols/facebook/util.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libpurple/protocols/facebook/util.c b/libpurple/protocols/facebook/util.c index a1dcfd5f4e..2d8132f8de 100644 --- a/libpurple/protocols/facebook/util.c +++ b/libpurple/protocols/facebook/util.c @@ -345,23 +345,23 @@ fb_util_request_buddy_cancel(gpointer *mata, PurpleRequestFields *fields) static gint fb_buddy_cmp(gconstpointer a, gconstpointer b) { - gint alias_verdict, name_verdict; - gchar *astr, *bstr; - - astr = g_utf8_casefold(purple_buddy_get_alias(a), -1); - bstr = g_utf8_casefold(purple_buddy_get_alias(b), -1); - alias_verdict = g_utf8_collate(astr, bstr); - g_free(astr); - g_free(bstr); - if (alias_verdict) { - return alias_verdict; - } - astr = g_utf8_casefold(purple_buddy_get_name(a), -1); - bstr = g_utf8_casefold(purple_buddy_get_name(b), -1); - name_verdict = g_utf8_collate(astr, bstr); - g_free(astr); - g_free(bstr); - return name_verdict; + gint alias_verdict, name_verdict; + gchar *astr, *bstr; + + astr = g_utf8_casefold(purple_buddy_get_alias(a), -1); + bstr = g_utf8_casefold(purple_buddy_get_alias(b), -1); + alias_verdict = g_utf8_collate(astr, bstr); + g_free(astr); + g_free(bstr); + if (alias_verdict != 0) { + return alias_verdict; + } + astr = g_utf8_casefold(purple_buddy_get_name(a), -1); + bstr = g_utf8_casefold(purple_buddy_get_name(b), -1); + name_verdict = g_utf8_collate(astr, bstr); + g_free(astr); + g_free(bstr); + return name_verdict; } gpointer |