qemu-trivial
[Top][All Lists]
Advanced

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

Re: [Qemu-trivial] [Qemu-devel] [PATCH] libcacard: g_malloc cleanups


From: Michael Tokarev
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH] libcacard: g_malloc cleanups
Date: Sun, 11 May 2014 15:42:23 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Icedove/24.5.0

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



reply via email to

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