mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: domen@coderock.org
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, domen@coderock.org, didickman@yahoo.com
Subject: [patch 1/8] fix lib/sort regression test
Date: Fri, 08 Apr 2005 09:50:46 +0200	[thread overview]
Message-ID: <20050408075048.B0E8A1F39E@trashy.coderock.org> (raw)



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: Domen Puncer <domen@coderock.org>
---


 kj-domen/lib/sort.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN lib/sort.c~bug-lib_sort lib/sort.c
--- kj/lib/sort.c~bug-lib_sort	2005-04-05 12:57:40.000000000 +0200
+++ kj-domen/lib/sort.c	2005-04-05 12:57:40.000000000 +0200
@@ -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);
_

                 reply	other threads:[~2005-04-08  7:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050408075048.B0E8A1F39E@trashy.coderock.org \
    --to=domen@coderock.org \
    --cc=akpm@osdl.org \
    --cc=didickman@yahoo.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®