rand: make randX_upto() do the end value increment
authorJens Axboe <axboe@kernel.dk>
Tue, 12 Jun 2018 17:43:29 +0000 (11:43 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 12 Jun 2018 17:43:29 +0000 (11:43 -0600)
commitcdfb5a85d9743fb53f4a2b56a392e0897a333568
tree7c9054b5f382a1f6e7af550db0e8aea8d35dcc0d
parentc6fc6d2ab2c2fb905ea859f051ad66a54c607916
rand: make randX_upto() do the end value increment

We should not do it in the caller, the functions that need
fixing are really rand32/64_upto() instead.

Also move a (now) misplaced comment.

Fixes: c6fc6d2ab2c2 ("rand: ensure that rand_between() can reach max value")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
lib/rand.h