Mercurial > pidgin
diff pidgin/gtkimhtmltoolbar.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 | 442128853bdb |
children | 84b0f9b23ede |
line wrap: on
line diff
--- a/pidgin/gtkimhtmltoolbar.c Tue Mar 13 06:53:43 2007 +0000 +++ b/pidgin/gtkimhtmltoolbar.c Tue Mar 13 07:19:06 2007 +0000 @@ -672,7 +672,7 @@ gtk_window_set_role(GTK_WINDOW(dialog), "smiley_dialog"); gtk_window_set_position(GTK_WINDOW(dialog), GTK_WIN_POS_MOUSE); - if (g_slist_length(unique_smileys)) { + if (unique_smileys != NULL) { struct smiley_button_list *ls, *it, *it_tmp; GtkWidget *line; int line_width = 0;