diff libpurple/protocols/novell/nmuser.c @ 15785:e926951e61fe

Don't use g_list_length() and g_slist_length() when all you want to do if check if the list is empty. Those two functions needlessly iterate through the entire list.
author Mark Doliner <mark@kingant.net>
date Tue, 13 Mar 2007 07:19:06 +0000
parents 5fe8042783c1
children 32c366eeeb99
line wrap: on
line diff
--- a/libpurple/protocols/novell/nmuser.c	Tue Mar 13 06:53:43 2007 +0000
+++ b/libpurple/protocols/novell/nmuser.c	Tue Mar 13 07:19:06 2007 +0000
@@ -1534,13 +1534,12 @@
 		}
 
 		/* Time to callback? */
-		if (g_slist_length(list) == 0) {
+		if (list == NULL) {
 			nm_response_cb cb = nm_request_get_callback(request);
 
 			if (cb) {
 				cb(user, 0, conference, conference);
 			}
-			g_slist_free(list);
 			nm_release_request(request);
 		}
 	}