Mercurial > pidgin
comparison libpurple/request.c @ 24552: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 | c2af0701d9cc |
children | 9bdd3ab8087f 89b95d143116 |
comparison
equal
deleted
inserted
replaced
24551:cd70713a996d | 24552:f10aba5592c6 |
---|---|
885 g_return_if_fail(field->type == PURPLE_REQUEST_FIELD_LIST); | 885 g_return_if_fail(field->type == PURPLE_REQUEST_FIELD_LIST); |
886 | 886 |
887 purple_request_field_list_clear_selected(field); | 887 purple_request_field_list_clear_selected(field); |
888 | 888 |
889 if (!purple_request_field_list_get_multi_select(field) && | 889 if (!purple_request_field_list_get_multi_select(field) && |
890 g_list_length(items) > 1) | 890 items && items->next) |
891 { | 891 { |
892 purple_debug_warning("request", | 892 purple_debug_warning("request", |
893 "More than one item added to non-multi-select " | 893 "More than one item added to non-multi-select " |
894 "field %s\n", | 894 "field %s\n", |
895 purple_request_field_get_id(field)); | 895 purple_request_field_get_id(field)); |