diff options
| author | Colin Ian King <[email protected]> | 2022-06-12 21:27:08 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2022-06-27 16:16:07 +0200 |
| commit | 5afbfa8cddb451432016fd37d836f9e5b1f0d6cb (patch) | |
| tree | affd6d6b12e37d01579770310531f6c18363eac7 | |
| parent | 6169525b76764acb81918aa387ac168fb9a55575 (diff) | |
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 <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| -rw-r--r-- | drivers/misc/lkdtm/cfi.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |