[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a5b0800904080705n74829b75l8becfd6e7d1a321f@mail.gmail.com>
Date: Wed, 8 Apr 2009 15:05:43 +0100
From: Will Newton <will.newton@...il.com>
To: Jack Stone <jwjstone@...tmail.fm>
Cc: Bert Wesarg <bert.wesarg@...glemail.com>,
linux-kernel@...r.kernel.org, jeff@...zik.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 20/56] inflate: Remove void casts
On Wed, Apr 8, 2009 at 2:54 PM, Jack Stone <jwjstone@...tmail.fm> wrote:
> Heres the fixed patch
>
> Thanks,
>
> Jack
>
> --
>
> inflate: Remove void casts
>
> From: Jack Stone <jwjstone@...tmail.fm>
>
> Remove uneeded void casts
>
> Signed-Off-By: Jack Stone <jwjstone@...tmail.fm>
> ---
>
> lib/inflate.c | 5 ++---
> 1 files changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/inflate.c b/lib/inflate.c
> index 1a8e8a9..1eb0cd8 100644
> --- a/lib/inflate.c
> +++ b/lib/inflate.c
> @@ -249,7 +249,7 @@ static void *malloc(int size)
>
> malloc_ptr = (malloc_ptr + 3) & ~3; /* Align */
>
> - p = (void *)malloc_ptr;
> + p = malloc_ptr;
> malloc_ptr += size;
Won't this cause a "assignment makes pointer from integer without a
cast" warning?
> if (free_mem_end_ptr && malloc_ptr >= free_mem_end_ptr)
> @@ -481,8 +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))) ==
> - (struct huft *)NULL)
> + if ((q = malloc((z + 1)*sizeof(struct huft))) == NULL)
> {
> if (h)
> huft_free(u[0]);
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists