changeset 18610:e333072d8680

I don't think this check is needed. If it is then it's because we're inserting "NULL" into a tlvchain and that should be fixed.
author Mark Doliner <mark@kingant.net>
date Sun, 22 Jul 2007 08:29:48 +0000
parents 2774acdb1cff
children 43a331f88c68
files libpurple/protocols/oscar/tlv.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/tlv.c	Sun Jul 22 08:28:55 2007 +0000
+++ b/libpurple/protocols/oscar/tlv.c	Sun Jul 22 08:29:48 2007 +0000
@@ -718,12 +718,10 @@
 
 	for (cur = list, i = 0; cur != NULL; cur = cur->next) {
 		tlv = cur->data;
-		if (tlv != NULL) { /* TODO: This NULL check shouldn't be needed */
-			if (tlv->type == type)
-				i++;
-			if (i >= nth)
-				return tlv;
-		}
+		if (tlv->type == type)
+			i++;
+		if (i >= nth)
+			return tlv;
 	}
 
 	return NULL;