lib/test_meminit: use && for bools
Subsystems (2)
PATCH 1/1 lib/test_meminit: use && for bools
As pointed out by Dan Carpenter, test_kmemcache() was using a bitwise AND on two bools instead of a boolean AND.
Fix this for the sake of code cleanliness.
Reported-by Dan Carpenter <[email protected]>
Fixes 5015a300a522 ("lib: introduce test_meminit module")
Signed-off-by Alexander Potapenko <[email protected]>
--- lib/test_meminit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/test_meminit.c +1 -1
@@ -387,7 +387,7 @@ static int __init test_kmemcache(int *total_failures) ctor = flags &1 ; rcu = flags &2 ; zero = flags &4 ; -if (ctor & zero) +if (ctor && zero)continue ; num_tests +=do_kmem_cache_size (size, ctor, rcu, zero, &failures);
Signature · 1 line
2.54.0.545.g6539524ca2-goog