Fix signed int/long truncation on 32-bit architectures
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>
diff --git a/filesetup.c b/filesetup.c
index 2b690c8..1350857 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -208,7 +208,7 @@
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);