Mercurial > pidgin.yaz
diff libpurple/protocols/jabber/si.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 | 88955b918197 |
children | 61e0924de04a c974d4453f12 a063901a5499 |
line wrap: on
line diff
--- a/libpurple/protocols/jabber/si.c Thu Nov 27 05:51:03 2008 +0000 +++ b/libpurple/protocols/jabber/si.c Thu Nov 27 05:54:09 2008 +0000 @@ -1085,7 +1085,7 @@ purple_notify_error(jsx->js->gc, _("File Send Failed"), _("File Send Failed"), msg); g_free(msg); - } else if(g_list_length(jb->resources) == 1) { + } else if(!jb->resources->next) { /* only 1 resource online (probably our most common case) * so no need to ask who to send to */ jbr = jb->resources->data;