summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2016-12-13 10:47:15 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-12-13 12:49:41 +0000
commitcd0dc8b3b113a204d3cad4e483816e72dad127ed (patch)
tree993e39a2db11b8cff4a7d33e9a655996da36d18a /lib
parent80baeb023223e7948ebfa22ebb4d3b706b4bc550 (diff)
lib: Allow permutation of the first two elements in the aray
Spotted-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib')
-rw-r--r--lib/igt_aux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/igt_aux.c b/lib/igt_aux.c
index 7d5aa52c..f323f6a2 100644
--- a/lib/igt_aux.c
+++ b/lib/igt_aux.c
@@ -499,7 +499,7 @@ void igt_permute_array(void *array, unsigned size,
{
int i;
- for (i = size - 1; i > 1; i--) {
+ for (i = size - 1; i > 0; i--) {
/* yes, not perfectly uniform, who cares */
long l = hars_petruska_f54_1_random_unsafe() % (i +1);
if (i != l)