If we pass a NULL error is the same that returning dirrectly the value.
Signed-off-by: Juan Quintela <[email protected]>
---
migration/qemu-file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/qemu-file.c b/migration/qemu-file.c
index a3d0412b5f..7cf457a981 100644
--- a/migration/qemu-file.c
+++ b/migration/qemu-file.c
@@ -209,7 +209,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;
}
/*
--
2.40.1