Skip to contentSkip to conversation

lkdtm: cfi: use NULL for a null pointer rather than zero

PATCH In review Colin Ian King 2 participants 2 messages Jun 12, 2022 – Jun 13, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lkdtm: cfi: use NULL for a null pointer rather than zero

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

---
 drivers/misc/lkdtm/cfi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/lkdtm/cfi.c +1 -1
index 666a7f4bc137..71483cb1e422 100644
@@ -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");
 
Signature · 1 line
2.35.3