diff options
Diffstat (limited to 'src/cowtest/main.c')
-rw-r--r-- | src/cowtest/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cowtest/main.c b/src/cowtest/main.c index c7da4ac..dc2bac5 100644 --- a/src/cowtest/main.c +++ b/src/cowtest/main.c @@ -1061,7 +1061,7 @@ bool randomWriteTest( char *mountedImagePath, char *normalImagePath, float minS off_t offset = rand() % maxOffset; size_t size = ( rand() + offset ) % RND_MAX_WRITE_SIZE; if ( size < RND_MAX_WRITE_SIZE / 2 ) { - size /= rand() % 8192; + size /= 1 + ( rand() % 8192 ); } size = MAX( size, 1 ); if ( r > RND_TRUNCATE_PROBABILITY + RND_UNALIGNED_WRITE_PROBABILITY ) { |