treewide: use get_random_u32_inclusive() when possible
[linux-2.6-block.git] / lib / test_printf.c
index 6d10187eddaceae405ed56f9dcf35e87fe4d186a..f098914a48d55cba248292d121280128940448b7 100644 (file)
@@ -126,7 +126,7 @@ __test(const char *expect, int elen, const char *fmt, ...)
         * be able to print it as expected.
         */
        failed_tests += do_test(BUF_SIZE, expect, elen, fmt, ap);
-       rand = 1 + get_random_u32_below(elen + 1);
+       rand = get_random_u32_inclusive(1, elen + 1);
        /* Since elen < BUF_SIZE, we have 1 <= rand <= BUF_SIZE. */
        failed_tests += do_test(rand, expect, elen, fmt, ap);
        failed_tests += do_test(0, expect, elen, fmt, ap);