From 59de517d8d482416a079da7ee8344187d513d4a4 Mon Sep 17 00:00:00 2001 From: Daniel P. Berrange Date: Thu, 11 Aug 2016 17:38:07 +0100 Subject: io: remove Error parameter from QIOTask thread worker Now that task objects have a directly associated error, there's no need for an an Error **errp parameter to the QIOTask thread worker function. It already has a QIOTask object, so can directly set the error on it. Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange --- tests/test-io-task.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tests') diff --git a/tests/test-io-task.c b/tests/test-io-task.c index 84144c9047..ff62272d5f 100644 --- a/tests/test-io-task.c +++ b/tests/test-io-task.c @@ -140,20 +140,18 @@ struct TestThreadWorkerData { GMainLoop *loop; }; -static int test_task_thread_worker(QIOTask *task, - Error **errp, - gpointer opaque) +static void test_task_thread_worker(QIOTask *task, + gpointer opaque) { struct TestThreadWorkerData *data = opaque; data->worker = g_thread_self(); if (data->fail) { - error_setg(errp, "Testing fail"); - return -1; + Error *err = NULL; + error_setg(&err, "Testing fail"); + qio_task_set_error(task, err); } - - return 0; } -- cgit v1.2.3-55-g7522