From 8efd4da53b552d48201fbcf5ec196b61ada67ea2 Mon Sep 17 00:00:00 2001 From: Jan Polensky Date: Wed, 27 Aug 2025 20:16:20 +0200 Subject: [PATCH] cpumf/pai: Fix sparse warning for NULL pointer usage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix sparse warning by using NULL instead of integer literal for pointer. Reviewed-by: Jan Höppner Signed-off-by: Jan Polensky Signed-off-by: Jan Höppner --- cpumf/pai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpumf/pai.c b/cpumf/pai.c index f10d1940..932f06e5 100644 --- a/cpumf/pai.c +++ b/cpumf/pai.c @@ -837,7 +837,7 @@ static int map_check(char *fn, int (*fct)(char *, unsigned char *, size_t, return 0; } - p = mmap(0, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); + p = mmap(NULL, sb.st_size, PROT_READ, MAP_SHARED, fd, 0); if (p == MAP_FAILED) { warnx("%s cannot map file", fn); close(fd);