Mercurial > pidgin.yaz
changeset 29342:8724fcca91ba
I find the code easier to read this way
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 03 Feb 2010 21:24:55 +0000 |
parents | 0f8a1e98408b |
children | 36dff94b1b53 |
files | libpurple/protocols/msn/userlist.c |
diffstat | 1 files changed, 2 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/userlist.c Wed Feb 03 21:20:44 2010 +0000 +++ b/libpurple/protocols/msn/userlist.c Wed Feb 03 21:24:55 2010 +0000 @@ -119,26 +119,16 @@ if (group_id == NULL) return FALSE; - if (g_list_find_custom(user->group_ids, group_id, (GCompareFunc)strcmp)) - return TRUE; - - return FALSE; + return (g_list_find_custom(user->group_ids, group_id, (GCompareFunc)strcmp)) != NULL; } gboolean msn_userlist_user_is_in_list(MsnUser *user, MsnListId list_id) { - int list_op; - if (user == NULL) return FALSE; - list_op = 1 << list_id; - - if (user->list_op & list_op) - return TRUE; - else - return FALSE; + return (user->list_op & (1 << list_id)); } /**************************************************************************