From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49994) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGpk4-0004hw-Tt for qemu-devel@nongnu.org; Thu, 10 May 2018 13:52:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGpk1-0003QA-Ms for qemu-devel@nongnu.org; Thu, 10 May 2018 13:52:36 -0400 Date: Thu, 10 May 2018 14:52:22 -0300 From: Eduardo Habkost Message-ID: <20180510175222.GV25013@localhost.localdomain> References: <20180423165126.15441-1-david@redhat.com> <20180423165126.15441-3-david@redhat.com> <20180504192635.GA4903@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v4 02/11] machine: make MemoryHotplugState accessible via the machine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: David Hildenbrand , qemu-devel@nongnu.org, Pankaj Gupta , "Michael S . Tsirkin" , Markus Armbruster , Alexander Graf , qemu-s390x@nongnu.org, qemu-ppc@nongnu.org, Marcel Apfelbaum , Igor Mammedov , David Gibson , Richard Henderson On Thu, May 10, 2018 at 06:57:32PM +0200, Paolo Bonzini wrote: [...] > > - machine->device_memory = g_malloc(sizeof(*machine->device_memory)); > > + machine->device_memory = g_malloc0(sizeof(*machine->device_memory)); > > g_new0 since you are at it? :) Nice suggestion, but this was already merged. I think we have a Coccinelle script that should detect this? -- Eduardo