Memory management review: match char-malloc/strdup-free, gchar-g_str*/g_free; set pointers to null after free; initialize fonts/backgrounds correctly when missing from config
git-svn-id: http://tint2.googlecode.com/svn/trunk@748 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
committed by
mrovi9000@gmail.com
parent
321ccc0794
commit
af003d0e19
@@ -618,7 +618,7 @@ void add_urgent(Task *tsk)
|
||||
// not yet in the list, so we have to add it
|
||||
urgent_list = g_slist_prepend(urgent_list, tsk);
|
||||
|
||||
if (urgent_timeout == 0)
|
||||
if (!urgent_timeout)
|
||||
urgent_timeout = add_timeout(10, 1000, blink_urgent, 0);
|
||||
|
||||
Panel *panel = tsk->area.panel;
|
||||
@@ -630,8 +630,8 @@ void add_urgent(Task *tsk)
|
||||
void del_urgent(Task *tsk)
|
||||
{
|
||||
urgent_list = g_slist_remove(urgent_list, tsk);
|
||||
if (urgent_list == 0) {
|
||||
if (!urgent_list) {
|
||||
stop_timeout(urgent_timeout);
|
||||
urgent_timeout = 0;
|
||||
urgent_timeout = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user