changeset 21762:477b020d5945

Recycle, reduce, reuse
author Mark Doliner <mark@kingant.net>
date Tue, 04 Dec 2007 06:12:52 +0000
parents 6360da6f3cc1
children 5bf56cc935a8
files libpurple/protocols/oscar/family_feedbag.c
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_feedbag.c	Tue Dec 04 05:47:59 2007 +0000
+++ b/libpurple/protocols/oscar/family_feedbag.c	Tue Dec 04 06:12:52 2007 +0000
@@ -341,13 +341,9 @@
  */
 struct aim_ssi_item *aim_ssi_itemlist_exists(struct aim_ssi_item *list, const char *sn)
 {
-	struct aim_ssi_item *cur;
-	if (!list || !sn)
+	if (!sn)
 		return NULL;
-	for (cur=list; cur; cur=cur->next)
-		if ((cur->type == AIM_SSI_TYPE_BUDDY) && (cur->name) && (!aim_sncmp(cur->name, sn)))
-			return cur;
-	return NULL;
+	return aim_ssi_itemlist_finditem(list, NULL, sn, AIM_SSI_TYPE_BUDDY);
 }
 
 /**