Skip to contentSkip to conversation

fix lib/sort regression test

PATCH In review [email protected] 1 participant 1 message Apr 8, 2005 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 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 <[email protected]>

---

 kj-domen/lib/sort.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
lib/sort.c renamed from lib/sort.c~bug-lib_sort +1 -1
diff -puN lib/sort.c~bug-lib_sort 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);

_