With using our internal random generator, we generate
unsigned ints. But by mistake this was assigned to
a signed long, that doesn't work so well on 32-bit machines.
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
static unsigned long long get_rand_file_size(struct thread_data *td)
{
unsigned long long ret, sized;
- long r;
+ unsigned long r;
if (td->o.use_os_rand) {
r = os_random_long(&td->file_size_state);
const int ddir = io_u->ddir;
unsigned int uninitialized_var(buflen);
unsigned int minbs, maxbs;
- long r, rand_max;
+ unsigned long r, rand_max;
assert(ddir_rw(ddir));
static inline enum fio_ddir get_rand_ddir(struct thread_data *td)
{
unsigned int v;
- long r;
+ unsigned long r;
if (td->o.use_os_rand) {
r = os_random_long(&td->rwmix_state);
do {
int opened = 0;
- long r;
+ unsigned long r;
if (td->o.use_os_rand) {
r = os_random_long(&td->next_file_state);
int io_u_should_trim(struct thread_data *td, struct io_u *io_u)
{
unsigned long long val;
- long r;
+ unsigned long r;
if (!td->o.trim_percentage)
return 0;