Skip to content

Commit

Permalink
Simplify thumb_std_maint_moved(), since g_list_append knows
Browse files Browse the repository at this point in the history
how to append to a NULL list. Patch by Uwe Ohse.
  • Loading branch information
Laurent Monin committed May 14, 2008
1 parent 7c3a925 commit 12d37bf
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/thumb_standard.c
Original file line number Diff line number Diff line change
Expand Up @@ -1068,14 +1068,8 @@ void thumb_std_maint_moved(const gchar *source, const gchar *dest)
g_idle_add_full(G_PRIORITY_LOW, thumb_std_maint_move_idle, NULL, NULL);
}

if (thumb_std_maint_move_tail)
{
thumb_std_maint_move_tail = g_list_append(thumb_std_maint_move_tail, tm);
thumb_std_maint_move_tail = thumb_std_maint_move_tail->next;
}
else
{
thumb_std_maint_move_list = g_list_append(thumb_std_maint_move_list, tm);
thumb_std_maint_move_tail = thumb_std_maint_move_list;
}
thumb_std_maint_move_tail = g_list_append(thumb_std_maint_move_tail, tm);
if (!thumb_std_maint_move_list)
thumb_std_maint_move_list = thumb_std_maint_move_tail;
thumb_std_maint_move_tail = thumb_std_maint_move_tail->next;
}

0 comments on commit 12d37bf

Please sign in to comment.