Commit de82c15d authored by Ricardo Ribalda's avatar Ricardo Ribalda Committed by Shuah Khan
Browse files

kunit: use NULL macros



Replace the NULL checks with the more specific and idiomatic NULL macros.

Reviewed-by: default avatarBrendan Higgins <brendanhiggins@google.com>
Reviewed-by: default avatarDaniel Latypov <dlatypov@google.com>
Signed-off-by: default avatarRicardo Ribalda <ribalda@chromium.org>
Signed-off-by: default avatarShuah Khan <skhan@linuxfoundation.org>
parent caae9458
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -91,6 +91,8 @@ static void example_all_expect_macros_test(struct kunit *test)
	KUNIT_EXPECT_NOT_ERR_OR_NULL(test, test);
	KUNIT_EXPECT_PTR_EQ(test, NULL, NULL);
	KUNIT_EXPECT_PTR_NE(test, test, NULL);
	KUNIT_EXPECT_NULL(test, NULL);
	KUNIT_EXPECT_NOT_NULL(test, test);

	/* String assertions */
	KUNIT_EXPECT_STREQ(test, "hi", "hi");
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,7 @@ static void kunit_log_test(struct kunit *test)
	KUNIT_EXPECT_NOT_ERR_OR_NULL(test,
				     strstr(suite.log, "along with this."));
#else
	KUNIT_EXPECT_PTR_EQ(test, test->log, (char *)NULL);
	KUNIT_EXPECT_NULL(test, test->log);
#endif
}