Skip to content

Commit

Permalink
qemu-file: Simplify qemu_file_get_error()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Juan Quintela committed Oct 31, 2023
1 parent 0743f41 commit fc55cf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion migration/qemu-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit fc55cf3

Please sign in to comment.