From cd0dc8b3b113a204d3cad4e483816e72dad127ed Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 13 Dec 2016 10:47:15 +0000 Subject: lib: Allow permutation of the first two elements in the aray Spotted-by: Joonas Lahtinen Signed-off-by: Chris Wilson --- lib/igt_aux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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) -- cgit v1.2.3