From: Domen Puncer Date: Thu, 5 May 2005 23:16:19 +0000 (-0700) Subject: [PATCH] fix lib/sort regression test X-Git-Tag: firefly_0821_release~43294 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d28c2bc8d192f606a4eb831978722107b20a9405;p=firefly-linux-kernel-4.4.55.git [PATCH] fix lib/sort regression test The regression test in lib/sort.c is currently worthless because the array that is generated for sorting will be all zeros. This patch fixes things so that the array that is generated will contain unsorted integers (that are not all identical) as was probably intended. Signed-off-by Daniel Dickman Signed-off-by: Domen Puncer Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/sort.c b/lib/sort.c index ea3caedeabdb..b73dbb0e7c83 100644 --- a/lib/sort.c +++ b/lib/sort.c @@ -90,7 +90,7 @@ int cmpint(const void *a, const void *b) static int sort_test(void) { - int *a, i, r = 0; + int *a, i, r = 1; a = kmalloc(1000 * sizeof(int), GFP_KERNEL); BUG_ON(!a);