lib/cmdline_kunit: Remove a cast which are no-longer required
authorDavid Gow <davidgow@google.com>
Thu, 13 May 2021 19:32:04 +0000 (12:32 -0700)
committerShuah Khan <skhan@linuxfoundation.org>
Wed, 23 Jun 2021 22:41:41 +0000 (16:41 -0600)
With some of the stricter type checking in KUnit's EXPECT macros
removed, a cast in cmdline_kunit is no longer required.

Remove the unnecessary cast, using NULL instead of (int *) to make it
clearer.

Signed-off-by: David Gow <davidgow@google.com>
Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
lib/cmdline_kunit.c

index 018bfc8..a72a2c1 100644 (file)
@@ -124,7 +124,7 @@ static void cmdline_do_one_range_test(struct kunit *test, const char *in,
                            n, e[0], r[0]);
 
        p = memchr_inv(&r[1], 0, sizeof(r) - sizeof(r[0]));
-       KUNIT_EXPECT_PTR_EQ_MSG(test, p, (int *)0, "in test %u at %u out of bound", n, p - r);
+       KUNIT_EXPECT_PTR_EQ_MSG(test, p, NULL, "in test %u at %u out of bound", n, p - r);
 }
 
 static void cmdline_test_range(struct kunit *test)