aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--block.c2
-rw-r--r--block/mirror.c2
-rw-r--r--block/nfs.c2
-rw-r--r--block/quorum.c4
-rw-r--r--docs/writing-qmp-commands.txt6
-rw-r--r--tests/test-qmp-input-strict.c8
6 files changed, 12 insertions, 12 deletions
diff --git a/block.c b/block.c
index bad7fe0..4745712 100644
--- a/block.c
+++ b/block.c
@@ -864,7 +864,7 @@ static int bdrv_open_common(BlockDriverState *bs, BlockDriverState *file,
node_name = qdict_get_try_str(options, "node-name");
bdrv_assign_node_name(bs, node_name, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
return -EINVAL;
}
diff --git a/block/mirror.c b/block/mirror.c
index 2618c37..36f4f8e 100644
--- a/block/mirror.c
+++ b/block/mirror.c
@@ -680,7 +680,7 @@ void commit_active_start(BlockDriverState *bs, BlockDriverState *base,
mirror_start_job(bs, base, speed, 0, 0,
on_error, on_error, cb, opaque, &local_err,
&commit_active_job_driver, false, base);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
goto error_restore_flags;
}
diff --git a/block/nfs.c b/block/nfs.c
index 98aa363..9fa831f 100644
--- a/block/nfs.c
+++ b/block/nfs.c
@@ -343,7 +343,7 @@ static int nfs_file_open(BlockDriverState *bs, QDict *options, int flags,
opts = qemu_opts_create(&runtime_opts, NULL, 0, &error_abort);
qemu_opts_absorb_qdict(opts, options, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
return -EINVAL;
}
diff --git a/block/quorum.c b/block/quorum.c
index 7f580a8..ecec3a5 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -753,7 +753,7 @@ static int quorum_open(BlockDriverState *bs, QDict *options, int flags,
opts = qemu_opts_create(&quorum_runtime_opts, NULL, 0, &error_abort);
qemu_opts_absorb_qdict(opts, options, &local_err);
- if (error_is_set(&local_err)) {
+ if (local_err) {
ret = -EINVAL;
goto exit;
}
@@ -828,7 +828,7 @@ close_exit:
g_free(opened);
exit:
/* propagate error */
- if (error_is_set(&local_err)) {
+ if (local_err) {
error_propagate(errp, local_err);
}
QDECREF(list);
diff --git a/docs/writing-qmp-commands.txt b/docs/writing-qmp-commands.txt
index 8349dec..3930a9b 100644
--- a/docs/writing-qmp-commands.txt
+++ b/docs/writing-qmp-commands.txt
@@ -311,7 +311,7 @@ void hmp_hello_world(Monitor *mon, const QDict *qdict)
Error *errp = NULL;
qmp_hello_world(!!message, message, &errp);
- if (error_is_set(&errp)) {
+ if (errp) {
monitor_printf(mon, "%s\n", error_get_pretty(errp));
error_free(errp);
return;
@@ -483,7 +483,7 @@ void hmp_info_alarm_clock(Monitor *mon)
Error *errp = NULL;
clock = qmp_query_alarm_clock(&errp);
- if (error_is_set(&errp)) {
+ if (errp) {
monitor_printf(mon, "Could not query alarm clock information\n");
error_free(errp);
return;
@@ -634,7 +634,7 @@ void hmp_info_alarm_methods(Monitor *mon)
Error *errp = NULL;
method_list = qmp_query_alarm_methods(&errp);
- if (error_is_set(&errp)) {
+ if (errp) {
monitor_printf(mon, "Could not query alarm methods\n");
error_free(errp);
return;
diff --git a/tests/test-qmp-input-strict.c b/tests/test-qmp-input-strict.c
index 38b5e95..f03353b 100644
--- a/tests/test-qmp-input-strict.c
+++ b/tests/test-qmp-input-strict.c
@@ -153,7 +153,7 @@ static void test_validate_union_flat(TestInputVisitorData *data,
/* TODO when generator bug is fixed, add 'integer': 41 */
visit_type_UserDefFlatUnion(v, &tmp, NULL, &errp);
- g_assert(!error_is_set(&errp));
+ g_assert(!errp);
qapi_free_UserDefFlatUnion(tmp);
}
@@ -167,7 +167,7 @@ static void test_validate_union_anon(TestInputVisitorData *data,
v = validate_test_init(data, "42");
visit_type_UserDefAnonUnion(v, &tmp, NULL, &errp);
- g_assert(!error_is_set(&errp));
+ g_assert(!errp);
qapi_free_UserDefAnonUnion(tmp);
}
@@ -240,7 +240,7 @@ static void test_validate_fail_union_flat(TestInputVisitorData *data,
v = validate_test_init(data, "{ 'string': 'c', 'integer': 41, 'boolean': true }");
visit_type_UserDefFlatUnion(v, &tmp, NULL, &errp);
- g_assert(error_is_set(&errp));
+ g_assert(errp);
qapi_free_UserDefFlatUnion(tmp);
}
@@ -254,7 +254,7 @@ static void test_validate_fail_union_anon(TestInputVisitorData *data,
v = validate_test_init(data, "3.14");
visit_type_UserDefAnonUnion(v, &tmp, NULL, &errp);
- g_assert(error_is_set(&errp));
+ g_assert(errp);
qapi_free_UserDefAnonUnion(tmp);
}