diff libpurple/protocols/oscar/family_feedbag.c @ 21762:477b020d5945

Recycle, reduce, reuse
author Mark Doliner <mark@kingant.net>
date Tue, 04 Dec 2007 06:12:52 +0000
parents 98514870b73c
children 979a81468e19
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);
 }
 
 /**