Re: [PATCH] atm/nicstar: remove a bunch of pointless casts of NULL

From: Alexey Dobriyan
Date: Tue May 10 2005 - 16:01:59 EST


On Wednesday 11 May 2005 00:06, Jesper Juhl wrote:
> It doesn't make sense to cast NULL. This patch removes the pointless casts
> from drivers/atm/nicstar.c

> --- linux-2.6.12-rc3-mm3-orig/drivers/atm/nicstar.c
> +++ linux-2.6.12-rc3-mm3/drivers/atm/nicstar.c

> scq = (scq_info *) kmalloc(sizeof(scq_info), GFP_KERNEL);
^^^^^^^^^^^^
> - if (scq == (scq_info *) NULL)
> - return (scq_info *) NULL;
> + if (scq == NULL)
> + return NULL;

> scq->skb = (struct sk_buff **) kmalloc(sizeof(struct sk_buff *) *
^^^^^^^^^^^^^^^^^^^
> (size / NS_SCQE_SIZE), GFP_KERNEL);
> - if (scq->skb == (struct sk_buff **) NULL)
> + if (scq->skb == NULL)

These are pointless too.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/