diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2016-08-11 17:38:07 +0100 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2017-01-23 15:32:19 +0000 |
commit | 59de517d8d482416a079da7ee8344187d513d4a4 (patch) | |
tree | f24cf5539b7780c8a794bcba796cb2ab4e78c37f /tests/test-io-task.c | |
parent | 60e705c51c66373f78e536e0462744a610c27cf6 (diff) | |
download | qemu-59de517d8d482416a079da7ee8344187d513d4a4.zip qemu-59de517d8d482416a079da7ee8344187d513d4a4.tar.gz qemu-59de517d8d482416a079da7ee8344187d513d4a4.tar.bz2 |
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 <eblake@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'tests/test-io-task.c')
-rw-r--r-- | tests/test-io-task.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/test-io-task.c b/tests/test-io-task.c index 84144c9..ff62272 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; } |