[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251109195754.GB20023@1wt.eu>
Date: Sun, 9 Nov 2025 20:57:54 +0100
From: Willy Tarreau <w@....eu>
To: Thomas Weißschuh <linux@...ssschuh.net>
Cc: linux-kernel@...r.kernel.org, kernel test robot <lkp@...el.com>
Subject: Re: [PATCH] tools/nolibc: avoid using plain integer as NULL pointer
Hi Thomas,
On Sun, Nov 09, 2025 at 08:27:29PM +0100, Thomas Weißschuh wrote:
> The integer zero should not be used as NULL pointer.
> It is invalid and sparse will complain about it.
>
> Use proper NULL pointers instead.
Huh ? I've been using that for decades and seeing it everywhere. That's
quite bizarre, 0 is perfectly valid as a pointer. Ah, here it is, in
C99:6.3.2.3:
An integer constant expression with the value 0, or such an expression
cast to type void *, is called a null pointer constant.
The change is small, so if it hurts sparse, I'm fine with changing it,
but at least the commit message should be adjusted to say that sparse
doesn't like it and not that it's not valid.
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/r/202509261452.g5peaXCc-lkp@intel.com/
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
For the patch: Acked-by: Willy Tarreau <w@....eu>
Thanks,
Willy
Powered by blists - more mailing lists