Received: from eggs.gnu.org ([2001:4830:134:3::10]:55552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WjS9G-0001CI-BB for qemu-devel@nongnu.org; Sun, 11 May 2014 07:42:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WjS9A-0004ie-1t for qemu-devel@nongnu.org; Sun, 11 May 2014 07:42:30 -0400 Message-ID: <536F621F.1010008@msgid.tls.msk.ru> Date: Sun, 11 May 2014 15:42:23 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1399564447-19473-1-git-send-email-mjt@msgid.tls.msk.ru> <536F2EE0.10305@redhat.com> In-Reply-To: <536F2EE0.10305@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] libcacard: g_malloc cleanups List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alon Levy , qemu-devel@nongnu.org Cc: qemu-trivial@nongnu.org 11.05.2014 12:03, Alon Levy wrote: [] >> diff --git a/libcacard/cac.c b/libcacard/cac.c >> index 74ef3e3..122129e 100644 >> --- a/libcacard/cac.c >> +++ b/libcacard/cac.c >> @@ -310,16 +310,11 @@ static VCardAppletPrivate * >> cac_new_pki_applet_private(const unsigned char *cert, >> int cert_len, VCardKey *key) >> { >> - CACPKIAppletData *pki_applet_data = NULL; >> - VCardAppletPrivate *applet_private = NULL; > > These two lines above (and the corresponding ones beloow) seem unrelated > to this patch. > >> - applet_private = (VCardAppletPrivate *)g_malloc(sizeof(VCardAppletPrivate)); >> + CACPKIAppletData *pki_applet_data; >> + VCardAppletPrivate *applet_private; >> >> + applet_private = g_new0(VCardAppletPrivate, 1); Yes, that's removal of initial value setting of variables which will be initialized on the next line. It is like cleaning up coding style (spacing around {} etc) in a nearby lines. I can mention this in the commit message, but I don't really think it is really important. Thanks, /mjt