Commit ccad78f1 authored by Ricardo Ribalda's avatar Ricardo Ribalda Committed by Shuah Khan

kasan: test: Use NULL macros

Replace PTR_EQ checks with the more idiomatic and specific NULL macros.
Acked-by: default avatarDaniel Latypov <dlatypov@google.com>
Signed-off-by: default avatarRicardo Ribalda <ribalda@chromium.org>
Acked-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent 7aadf843
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment