summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/torture/locktest.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/torture/locktest.c b/source3/torture/locktest.c
index f7f7c580aa..54cf0dd351 100644
--- a/source3/torture/locktest.c
+++ b/source3/torture/locktest.c
@@ -388,7 +388,7 @@ static void test_locks(char *share[NSERVERS])
recorded[n].conn = random() % NCONNECTIONS;
recorded[n].f = random() % NFILES;
recorded[n].start = LOCKBASE + ((unsigned)random() % (LOCKRANGE-1));
- recorded[n].len = 1 +
+ recorded[n].len =
random() % (LOCKRANGE-(recorded[n].start-LOCKBASE));
recorded[n].start *= RANGE_MULTIPLE;
recorded[n].len *= RANGE_MULTIPLE;