changeset 18814:f4d67b36f0c1

Use g_slist_find_custom() instead of writing one ourselves
author Mark Doliner <mark@kingant.net>
date Mon, 06 Aug 2007 06:30:25 +0000
parents 1abc28b51b0c
children 9f3a85a59939
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Mon Aug 06 06:24:37 2007 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Mon Aug 06 06:30:25 2007 +0000
@@ -1873,10 +1873,9 @@
 			saved_b16 = purple_buddy_icons_get_checksum_for_user(b);
 
 		if (!b16 || !saved_b16 || strcmp(b16, saved_b16)) {
-			GSList *cur = od->requesticon;
-			while (cur && aim_sncmp((char *)cur->data, info->sn))
-				cur = cur->next;
-			if (!cur) {
+			if (g_slist_find_custom(od->requesticon, info->sn,
+					(GCompareFunc)aim_sncmp) == NULL)
+			{
 				od->requesticon = g_slist_append(od->requesticon, g_strdup(purple_normalize(account, info->sn)));
 				if (od->icontimer == 0)
 					od->icontimer = purple_timeout_add(1, purple_icon_timerfunc, gc);