diff options
author | Juan Quintela <quintela@redhat.com> | 2023-10-25 11:11:14 +0200 |
---|---|---|
committer | Juan Quintela <quintela@redhat.com> | 2023-10-31 08:44:33 +0100 |
commit | fc55cf318a19c385c25843865788ffdd05cde607 (patch) | |
tree | f3b6f2ff09243b7bcd770c5d6dead91cfc3df548 /migration | |
parent | 0743f41fd293b033de289c52faa45d06a5b1d544 (diff) | |
download | qemu-fc55cf318a19c385c25843865788ffdd05cde607.zip qemu-fc55cf318a19c385c25843865788ffdd05cde607.tar.gz qemu-fc55cf318a19c385c25843865788ffdd05cde607.tar.bz2 |
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 <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20231025091117.6342-10-quintela@redhat.com>
Diffstat (limited to 'migration')
-rw-r--r-- | migration/qemu-file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/migration/qemu-file.c b/migration/qemu-file.c index 0158db2..7e73874 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; } /* |