mirror of https://github.com/xemu-project/xemu.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 <farosas@suse.de> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20231025091117.6342-10-quintela@redhat.com>
This commit is contained in:
parent
0743f41fd2
commit
fc55cf318a
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue