diff options
| author | Thomas Weißschuh <linux@weissschuh.net> | 2025-11-09 20:27:29 +0100 |
|---|---|---|
| committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-11-09 21:29:57 +0100 |
| commit | 2d8482959efee5721456d199106b9c256c11b11b (patch) | |
| tree | 6c8edf56d391f85955a4a759c3ad0cde2a7af3d7 /tools/include/nolibc/sys.h | |
| parent | 107eb8336e8782ae8e98b60962852a1e29aca715 (diff) | |
tools/nolibc: avoid using plain integer as NULL pointer
While an integer zero is a valid NULL pointer as per the C standard,
sparse will complain about it.
Use explicit NULL pointers instead.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/r/202509261452.g5peaXCc-lkp@intel.com/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Acked-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools/include/nolibc/sys.h')
| -rw-r--r-- | tools/include/nolibc/sys.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/include/nolibc/sys.h b/tools/include/nolibc/sys.h index 28481feedb37..fcc36cffad4d 100644 --- a/tools/include/nolibc/sys.h +++ b/tools/include/nolibc/sys.h @@ -106,7 +106,7 @@ static __attribute__((unused)) void *sbrk(intptr_t inc) { /* first call to find current end */ - void *ret = sys_brk(0); + void *ret = sys_brk(NULL); if (ret && sys_brk(ret + inc) == ret + inc) return ret + inc; |