changeset 28956:36dff94b1b53

merge of '557198948608028bc4f826a546a3948c4899bdf0' and 'f34a9d45f9fd63b92e95fe69115042eadbe7c053'
author Mark Doliner <mark@kingant.net>
date Wed, 03 Feb 2010 22:02:46 +0000
parents 57550ffb7870 (current diff) 8724fcca91ba (diff)
children 452043d200f0
files
diffstat 2 files changed, 7 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/userlist.c	Wed Feb 03 21:40:39 2010 +0000
+++ b/libpurple/protocols/msn/userlist.c	Wed Feb 03 22:02:46 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));
 }
 
 /**************************************************************************
--- a/libpurple/protocols/msn/userlist.h	Wed Feb 03 21:40:39 2010 +0000
+++ b/libpurple/protocols/msn/userlist.h	Wed Feb 03 22:02:46 2010 +0000
@@ -31,12 +31,11 @@
 
 typedef enum
 {
-	MSN_LIST_FL,
-	MSN_LIST_AL,
-	MSN_LIST_BL,
-	MSN_LIST_RL,
-	MSN_LIST_PL
-
+	MSN_LIST_FL, /**< Forward list */
+	MSN_LIST_AL, /**< Allow list */
+	MSN_LIST_BL, /**< Block list */
+	MSN_LIST_RL, /**< Reverse list */
+	MSN_LIST_PL  /**< Pending list */
 } MsnListId;