public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] lkdtm: cfi: use NULL for a null pointer rather than zero
@ 2022-06-12 20:27 Colin Ian King
  2022-06-13 17:13 ` Kees Cook
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-06-12 20:27 UTC (permalink / raw)
  To: Kees Cook, Arnd Bergmann, Greg Kroah-Hartman
  Cc: kernel-janitors, linux-kernel

There is a pointer being initialized with a zero, use NULL instead.

Cleans up sparse warning:
drivers/misc/lkdtm/cfi.c:100:27: warning: Using plain integer as NULL pointer

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/misc/lkdtm/cfi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/misc/lkdtm/cfi.c b/drivers/misc/lkdtm/cfi.c
index 666a7f4bc137..71483cb1e422 100644
--- a/drivers/misc/lkdtm/cfi.c
+++ b/drivers/misc/lkdtm/cfi.c
@@ -97,7 +97,7 @@ static volatile int force_check;
 static void lkdtm_CFI_BACKWARD(void)
 {
 	/* Use calculated gotos to keep labels addressable. */
-	void *labels[] = {0, &&normal, &&redirected, &&check_normal, &&check_redirected};
+	void *labels[] = { NULL, &&normal, &&redirected, &&check_normal, &&check_redirected };
 
 	pr_info("Attempting unchecked stack return address redirection ...\n");
 
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-13 19:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-12 20:27 [PATCH] lkdtm: cfi: use NULL for a null pointer rather than zero Colin Ian King
2022-06-13 17:13 ` Kees Cook

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox