diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-12-04 10:36:23 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-12-18 08:36:15 +0100 |
commit | 8ca63ba8c2b1ee6746d2c245d70d82e7f7ef6e46 (patch) | |
tree | 3a8698896660c693232b4f333f155cae7a5758ab /tests/test-blockjob.c | |
parent | 8574c9f1ad905e473593230308a0b2a68c46ebe3 (diff) |
error: Clean up unusual names of Error * variables
Local Error * variables are conventionally named @err or @local_err,
and Error ** parameters @errp. Naming local variables like parameters
is confusing. Clean that up.
Naming parameters like local variables is also confusing. Left for
another day.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20191204093625.14836-17-armbru@redhat.com>
Diffstat (limited to 'tests/test-blockjob.c')
-rw-r--r-- | tests/test-blockjob.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test-blockjob.c b/tests/test-blockjob.c index 7844c9ffcb..e670a20617 100644 --- a/tests/test-blockjob.c +++ b/tests/test-blockjob.c @@ -34,13 +34,13 @@ static BlockJob *mk_job(BlockBackend *blk, const char *id, int flags) { BlockJob *job; - Error *errp = NULL; + Error *err = NULL; job = block_job_create(id, drv, NULL, blk_bs(blk), 0, BLK_PERM_ALL, 0, flags, block_job_cb, - NULL, &errp); + NULL, &err); if (should_succeed) { - g_assert_null(errp); + g_assert_null(err); g_assert_nonnull(job); if (id) { g_assert_cmpstr(job->job.id, ==, id); @@ -48,9 +48,9 @@ static BlockJob *mk_job(BlockBackend *blk, const char *id, g_assert_cmpstr(job->job.id, ==, blk_name(blk)); } } else { - g_assert_nonnull(errp); + g_assert_nonnull(err); g_assert_null(job); - error_free(errp); + error_free(err); } return job; @@ -80,9 +80,9 @@ static BlockBackend *create_blk(const char *name) bdrv_unref(bs); if (name) { - Error *errp = NULL; - monitor_add_blk(blk, name, &errp); - g_assert_null(errp); + Error *err = NULL; + monitor_add_blk(blk, name, &err); + g_assert_null(err); } return blk; |