From: Ricardo Ribalda Date: Fri, 11 Feb 2022 16:42:44 +0000 (+0100) Subject: kasan: test: Use NULL macros X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=ccad78f17f9f2a9acc811f8762aa428644205c9b;p=linux.git kasan: test: Use NULL macros Replace PTR_EQ checks with the more idiomatic and specific NULL macros. Acked-by: Daniel Latypov Signed-off-by: Ricardo Ribalda Acked-by: Brendan Higgins Signed-off-by: Shuah Khan --- diff --git a/lib/test_kasan.c b/lib/test_kasan.c index ad880231dfa84..c233b1a4e9849 100644 --- a/lib/test_kasan.c +++ b/lib/test_kasan.c @@ -391,7 +391,7 @@ static void krealloc_uaf(struct kunit *test) kfree(ptr1); KUNIT_EXPECT_KASAN_FAIL(test, ptr2 = krealloc(ptr1, size2, GFP_KERNEL)); - KUNIT_ASSERT_PTR_EQ(test, (void *)ptr2, NULL); + KUNIT_ASSERT_NULL(test, ptr2); KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)ptr1); }