From: Juan Quintela Date: Wed, 25 Oct 2023 09:11:14 +0000 (+0200) Subject: qemu-file: Simplify qemu_file_get_error() X-Git-Tag: qemu-xen-4.20.0~460^2~3 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=fc55cf318a19c385c25843865788ffdd05cde607;p=qemu-xen.git qemu-file: Simplify qemu_file_get_error() If we pass a NULL error is the same that returning directly the value. Reviewed-by: Fabiano Rosas Signed-off-by: Juan Quintela Message-ID: <20231025091117.6342-10-quintela@redhat.com> --- diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 0158db2a54..7e738743ce 100644 --- a/migration/qemu-file.c +++ b/migration/qemu-file.c @@ -204,7 +204,7 @@ void qemu_file_set_error_obj(QEMUFile *f, int ret, Error *err) */ int qemu_file_get_error(QEMUFile *f) { - return qemu_file_get_error_obj(f, NULL); + return f->last_error; } /*