lkml.org 
[lkml]   [2009]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 20/56] inflate: Remove void casts
walter harms wrote:
> Bert Wesarg schrieb:
>
>> On Wed, Apr 8, 2009 at 13:21, Jack Stone <jwjstone@fastmail.fm> wrote:
>>
>>> Remove uneeded void casts
>>>
>>> Signed-Off-By: Jack Stone <jwjstone@fastmail.fm>
>>> ---
>>> lib/inflate.c | 4 ++--
>>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/lib/inflate.c b/lib/inflate.c
>>> index 1a8e8a9..4b672f9 100644
>>> --- a/lib/inflate.c
>>> +++ b/lib/inflate.c
>>> @@ -481,7 +481,7 @@ DEBG1("3 ");
>>> z = 1 << j; /* table entries for j-bit table */
>>>
>>> /* allocate and link in new table */
>>> - if ((q = (struct huft *)malloc((z + 1)*sizeof(struct huft))) ==
>>> + if ((q = malloc((z + 1)*sizeof(struct huft))) ==
>>> (struct huft *)NULL)
>>>
> and move the q= from the if. less than half the size.
>
> q = malloc( (z + 1)*sizeof(*q) ):
> if ( q == NULL )
>
I was avoiding that sort of thing as this patch series is large enough
as it is.

Thanks,

Jack


\
 
 \ /
  Last update: 2009-04-08 16:29    [from the cache]
©2003-2011 Jasper Spaans