[glib: 4/6] tests: Use G_SOURCE_CONTINUE/G_SOURCE_REMOVE instead of booleans



commit 5e49d53cd5a8684ad4cdafcd189269931cb80483
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Jun 17 18:31:45 2020 +0100

    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>

 gio/tests/cancellable.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gio/tests/cancellable.c b/gio/tests/cancellable.c
index 97546132c..62a10702e 100644
--- a/gio/tests/cancellable.c
+++ b/gio/tests/cancellable.c
@@ -89,7 +89,7 @@ mock_operation_timeout (gpointer user_data)
         g_test_message ("LOOP: %u stopped at %u",
                         data->iterations_requested, iterations_done);
       g_task_return_boolean (task, TRUE);
-      return FALSE; /* don't call timeout again */
+      return G_SOURCE_REMOVE;
     }
   else
     {
@@ -97,7 +97,7 @@ mock_operation_timeout (gpointer user_data)
       if (g_test_verbose ())
         g_test_message ("LOOP: %u iteration %u",
                         data->iterations_requested, iterations_done + 1);
-      return TRUE; /* call timeout */
+      return G_SOURCE_CONTINUE;
     }
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]