# HG changeset patch # User Mark Doliner # Date 1265232295 0 # Node ID 8724fcca91ba02d38cc98691d0f720bd17b74a91 # Parent 0f8a1e98408b9421e47d5b94429d2d90a9d27d32 I find the code easier to read this way diff -r 0f8a1e98408b -r 8724fcca91ba libpurple/protocols/msn/userlist.c --- 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)); } /**************************************************************************