Skip to content

Commit

Permalink
[PATCH] fix lib/sort regression test
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Domen Puncer <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Domen Puncer authored and Linus Torvalds committed May 5, 2005
1 parent cad359c commit d28c2bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d28c2bc

Please sign in to comment.