Received: from eggs.gnu.org ([2001:4830:134:3::10]:40667) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zri1q-00022t-CM for qemu-devel@nongnu.org; Thu, 29 Oct 2015 03:53:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zri1m-0008H2-BV for qemu-devel@nongnu.org; Thu, 29 Oct 2015 03:53:46 -0400 Message-ID: <5631D085.30604@msgid.tls.msk.ru> Date: Thu, 29 Oct 2015 10:53:41 +0300 From: Michael Tokarev MIME-Version: 1.0 References: <1444406198-6521-1-git-send-email-thuth@redhat.com> In-Reply-To: <1444406198-6521-1-git-send-email-thuth@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/4] Small optimizations for code using g_malloc0 + memset/memcpy List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , qemu-devel@nongnu.org, qemu-trivial@nongnu.org 09.10.2015 18:56, Thomas Huth wrote: > There are a couple of spots in the QEMU code which use g_malloc0, > directly followed by a memset or memcpy which fill the whole > allocated buffer. In this case it either does not make sense to > zero the buffer via g_malloc0 first (so g_malloc should be used > instead), or if the second command is a memset(..., 0, ...), then > the memset does not make much sense, of course, since the buffer > has already been zeroed by the g_malloc0. Applied to -trivial, thanks! The 4/4 patch has been picked up by Riku. /mjt