From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XroDW-00057D-Et for qemu-devel@nongnu.org; Fri, 21 Nov 2014 08:25:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XroDQ-00042x-9F for qemu-devel@nongnu.org; Fri, 21 Nov 2014 08:25:42 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42526) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XroDP-00042r-RZ for qemu-devel@nongnu.org; Fri, 21 Nov 2014 08:25:36 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sALDPZrf018927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Fri, 21 Nov 2014 08:25:35 -0500 Message-ID: <546F3D4C.4000406@redhat.com> Date: Fri, 21 Nov 2014 14:25:32 +0100 From: Max Reitz MIME-Version: 1.0 References: <1416566940-4430-1-git-send-email-stefanha@redhat.com> <1416566940-4430-3-git-send-email-stefanha@redhat.com> In-Reply-To: <1416566940-4430-3-git-send-email-stefanha@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/4] blockdev: drop unnecessary DriveBackupState field assignment List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , qemu-devel@nongnu.org Cc: Kevin Wolf , Paolo Bonzini On 2014-11-21 at 11:48, Stefan Hajnoczi wrote: > 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 > --- > blockdev.c | 2 -- > 1 file changed, 2 deletions(-) Reviewed-by: Max Reitz