mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-03 14:42:10 +01:00
tests: Use G_SOURCE_CONTINUE/G_SOURCE_REMOVE instead of booleans
This makes no functional difference, but clarifies the code a little. Signed-off-by: Philip Withnall <withnall@endlessm.com>
This commit is contained in:
parent
a956b096af
commit
5e49d53cd5
@ -89,7 +89,7 @@ mock_operation_timeout (gpointer user_data)
|
|||||||
g_test_message ("LOOP: %u stopped at %u",
|
g_test_message ("LOOP: %u stopped at %u",
|
||||||
data->iterations_requested, iterations_done);
|
data->iterations_requested, iterations_done);
|
||||||
g_task_return_boolean (task, TRUE);
|
g_task_return_boolean (task, TRUE);
|
||||||
return FALSE; /* don't call timeout again */
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ mock_operation_timeout (gpointer user_data)
|
|||||||
if (g_test_verbose ())
|
if (g_test_verbose ())
|
||||||
g_test_message ("LOOP: %u iteration %u",
|
g_test_message ("LOOP: %u iteration %u",
|
||||||
data->iterations_requested, iterations_done + 1);
|
data->iterations_requested, iterations_done + 1);
|
||||||
return TRUE; /* call timeout */
|
return G_SOURCE_CONTINUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user