diff options
author | Markus Armbruster <armbru@redhat.com> | 2014-04-25 16:50:31 +0200 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-04-25 18:05:06 +0200 |
commit | 0fb6395c0cb5046432a80d608ddde7a3b2f8a9ae (patch) | |
tree | bc4d5b75394733d277652b127066461b7197c360 /block/mirror.c | |
parent | a28315ebaf3910b65ef51abefc4ef040265afc19 (diff) | |
download | qemu-0fb6395c0cb5046432a80d608ddde7a3b2f8a9ae.zip |
Use error_is_set() only when necessary (again)
error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out. Unnecessarily hard for
optimizers, static checkers, and human readers. Commit 84d18f0 dumbed
it down to obvious, but a few more have crept in since, and
documentation was overlooked. Dumb these down, too.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/mirror.c')
-rw-r--r-- | block/mirror.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/mirror.c b/block/mirror.c index 2618c3763c..36f4f8e8bd 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; } |