iolog: fix leak for unsupported iolog version
[fio.git] / lib / rand.c
index 9c3e0d6a39e181149ad04ac5c36f7220d115de95..99846a8d0fdd553e9fa3faea39f73c6971da13ac 100644 (file)
@@ -34,9 +34,8 @@
 */
 
 #include <string.h>
-#include <assert.h>
 #include "rand.h"
-#include "lib/pattern.h"
+#include "pattern.h"
 #include "../hash.h"
 
 int arch_random;
@@ -157,7 +156,7 @@ void __fill_random_buf_percentage(unsigned long seed, void *buf,
                /*
                 * Fill random chunk
                 */
-               this_len = (segment * (100 - percentage)) / 100;
+               this_len = ((unsigned long long)segment * (100 - percentage)) / 100;
                if (this_len > len)
                        this_len = len;