summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip.withnall@collabora.co.uk>2014-11-06 10:41:57 +0000
committerPhilip Withnall <philip.withnall@collabora.co.uk>2014-11-06 10:41:57 +0000
commit28d1c100c1bdfa123bf8a64706640ee8dbd18247 (patch)
treea17f992f5134a81bb347894b718472eedb857678
parent8afd815d98cc25db1063715109957333db1f4574 (diff)
tests: Use G_SOURCE_[CONTINUE|REMOVE] instead of booleans
Makes the test code a little clearer. Introduces no functional changes.
-rw-r--r--tests/test-send-recv.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test-send-recv.c b/tests/test-send-recv.c
index eac5b91..55e6002 100644
--- a/tests/test-send-recv.c
+++ b/tests/test-send-recv.c
@@ -916,7 +916,7 @@ read_stream_cb (GObject *pollable_stream, gpointer _user_data)
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK);
g_error_free (error);
g_free (buf);
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
g_assert_no_error (error);
@@ -928,10 +928,10 @@ read_stream_cb (GObject *pollable_stream, gpointer _user_data)
/* Termination time? */
if (test_data->received_bytes == test_data->n_bytes) {
g_main_loop_quit (gsource_data->main_loop);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static void
@@ -994,7 +994,7 @@ write_stream_cb (GObject *pollable_stream, gpointer _user_data)
if (len == -1) {
g_assert_error (error, G_IO_ERROR, G_IO_ERROR_WOULD_BLOCK);
g_free (buf);
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
g_assert_no_error (error);
@@ -1006,10 +1006,10 @@ write_stream_cb (GObject *pollable_stream, gpointer _user_data)
/* Termination time? */
if (test_data->transmitted_bytes == test_data->n_bytes) {
g_main_loop_quit (gsource_data->main_loop);
- return FALSE;
+ return G_SOURCE_REMOVE;
}
- return TRUE;
+ return G_SOURCE_CONTINUE;
}
static void