Mercurial > geeqie.yaz
changeset 665:97dd95e210c8
Simplify collect_manager_add_action(), since g_list_append knows
how to append to a NULL list. Patch by Uwe Ohse.
author | zas_ |
---|---|
date | Wed, 14 May 2008 16:52:55 +0000 |
parents | db373fb1b9d8 |
children | 732f72201fc7 |
files | src/collect-io.c |
diffstat | 1 files changed, 4 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/collect-io.c Wed May 14 12:59:00 2008 +0000 +++ b/src/collect-io.c Wed May 14 16:52:55 2008 +0000 @@ -858,16 +858,10 @@ /* we keep track of the list's tail to keep this a n(1) operation */ - if (collection_manager_action_tail) - { - collection_manager_action_tail = g_list_append(collection_manager_action_tail, action); - collection_manager_action_tail = collection_manager_action_tail->next; - } - else - { - collection_manager_action_list = g_list_append(collection_manager_action_list, action); - collection_manager_action_tail = collection_manager_action_list; - } + collection_manager_action_tail = g_list_append(collection_manager_action_tail, action); + if (!collection_manager_action_list) + collection_manager_action_list = collection_manager_action_tail; + collection_manager_action_tail = collection_manager_action_tail->next; collect_manager_timer_push(FALSE); }