Skip to content
Snippets Groups Projects
Commit d28c2bc8 authored by Domen Puncer's avatar Domen Puncer Committed by Linus Torvalds
Browse files

[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 <didickman@yahoo.com>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent cad359c6
No related branches found
No related tags found
No related merge requests found
...@@ -90,7 +90,7 @@ int cmpint(const void *a, const void *b) ...@@ -90,7 +90,7 @@ int cmpint(const void *a, const void *b)
static int sort_test(void) static int sort_test(void)
{ {
int *a, i, r = 0; int *a, i, r = 1;
a = kmalloc(1000 * sizeof(int), GFP_KERNEL); a = kmalloc(1000 * sizeof(int), GFP_KERNEL);
BUG_ON(!a); BUG_ON(!a);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment