diff libpurple/protocols/sametime/sametime.c @ 24497:f10aba5592c6

The other day while struct hiding, I noticed a for loop that was checking g_list_length() as the loop conditional. I decided to check all our calls to g_list_length() to see which ones I could clean up without too much work.
author Richard Laager <rlaager@wiktel.com>
date Thu, 27 Nov 2008 05:54:09 +0000
parents f387ded6f5ed
children d8452c0bec7b 9bdd3ab8087f 25e2ab1fff1d 89b95d143116
line wrap: on
line diff
--- a/libpurple/protocols/sametime/sametime.c	Thu Nov 27 05:51:03 2008 +0000
+++ b/libpurple/protocols/sametime/sametime.c	Thu Nov 27 05:54:09 2008 +0000
@@ -4415,7 +4415,7 @@
     res = results->data;
 
   if(!code && res && res->matches) {
-    if(g_list_length(res->matches) == 1) {
+    if(!res->matches->next) {
       struct mwResolveMatch *match = res->matches->data;
       
       /* only one? that might be the right one! */