From: Colin Ian King Date: Sun, 12 Jun 2022 20:27:08 +0000 (+0100) Subject: lkdtm: cfi: use NULL for a null pointer rather than zero X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5afbfa8cddb451432016fd37d836f9e5b1f0d6cb;p=linux.git 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 Acked-by: Kees Cook Signed-off-by: Colin Ian King Link: https://lore.kernel.org/r/20220612202708.2754270-1-colin.i.king@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/lkdtm/cfi.c b/drivers/misc/lkdtm/cfi.c index 666a7f4bc1375..71483cb1e422a 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");