qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 39/73] blockdev: drop unnecessary DriveBackupState fi


From: Kevin Wolf
Subject: [Qemu-devel] [PULL 39/73] blockdev: drop unnecessary DriveBackupState field assignment
Date: Wed, 10 Dec 2014 11:34:05 +0100

From: Stefan Hajnoczi <address@hidden>

drive_backup_prepare() assigns DriveBackupState fields to NULL in the
error path.  This is unnecessary because the DriveBackupState is
allocated using g_malloc0() and other functions like
external_snapshot_prepare() already rely on this.

Do not explicitly assign fields to NULL so that the error path is
concise and does not require modification when fields are added to
DriveBackupState.

Signed-off-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Kevin Wolf <address@hidden>
---
 blockdev.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/blockdev.c b/blockdev.c
index 490f698..b58ce30 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -1489,8 +1489,6 @@ static void drive_backup_prepare(BlkTransactionState 
*common, Error **errp)
                      &local_err);
     if (local_err) {
         error_propagate(errp, local_err);
-        state->bs = NULL;
-        state->job = NULL;
         return;
     }
 
-- 
1.8.3.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]