On 7/22/20 3:40 AM, Markus Armbruster wrote:
Patch created mechanically by rerunning:

     $ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
              --macro-file scripts/cocci-macro-file.h \
              --use-gitgrep .

Cc: Jens Freimann <[email protected]>
Cc: Hailiang Zhang <[email protected]>
Cc: Juan Quintela <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
---

+++ b/migration/colo.c
@@ -798,9 +798,7 @@ static void 
colo_incoming_process_checkpoint(MigrationIncomingState *mis,
colo_send_message(mis->to_src_file, COLO_MESSAGE_VMSTATE_LOADED,
                   &local_err);
-    if (local_err) {
-        error_propagate(errp, local_err);
-    }
+    error_propagate(errp, local_err);
  }

As this is mechanical, it is fine. But there is now a further cleanup possible of passing errp directly to colo_send_message, and possibly dropping local_err altogether.

Reviewed-by: Eric Blake <[email protected]>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org


Reply via email to