提交 ccad78f1 编写于 作者: R Ricardo Ribalda 提交者: Shuah Khan

kasan: test: Use NULL macros

Replace PTR_EQ checks with the more idiomatic and specific NULL macros.
Acked-by: NDaniel Latypov <dlatypov@google.com>
Signed-off-by: NRicardo Ribalda <ribalda@chromium.org>
Acked-by: NBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
上级 7aadf843
...@@ -391,7 +391,7 @@ static void krealloc_uaf(struct kunit *test) ...@@ -391,7 +391,7 @@ static void krealloc_uaf(struct kunit *test)
kfree(ptr1); kfree(ptr1);
KUNIT_EXPECT_KASAN_FAIL(test, ptr2 = krealloc(ptr1, size2, GFP_KERNEL)); 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); KUNIT_EXPECT_KASAN_FAIL(test, *(volatile char *)ptr1);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册