lkml.org 
[lkml]   [2010]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/4] kernel/kfifo.c: fix "interger as NULL pointer" warning.
From
Date
Am Sonntag, den 24.01.2010, 11:03 -0500 schrieb Thiago Farina:
> kernel/kfifo.c:83:35: warning: Using plain integer as NULL pointer
>

I don't know where you get this kind of warning. But passing 0 for a
NULL pointer is ANSI C standard.

> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
> kernel/kfifo.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/kfifo.c b/kernel/kfifo.c
> index 32c5c15..6fe4a56 100644
> --- a/kernel/kfifo.c
> +++ b/kernel/kfifo.c
> @@ -80,7 +80,7 @@ int kfifo_alloc(struct kfifo *fifo, unsigned int size, gfp_t gfp_mask)
>
> buffer = kmalloc(size, gfp_mask);
> if (!buffer) {
> - _kfifo_init(fifo, 0, 0);
> + _kfifo_init(fifo, NULL, 0);
> return -ENOMEM;
> }
>




\
 
 \ /
  Last update: 2010-01-24 18:17    [W:0.085 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site