lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0709251652050.945@fbirervta.pbzchgretzou.qr>
Date:	Tue, 25 Sep 2007 16:52:47 +0200 (CEST)
From:	Jan Engelhardt <jengelh@...putergmbh.de>
To:	Subbaiah Venkata <kvsnaidu@...naidu.net>
cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lib/sort.c, 2.6.22 kernel


On Aug 8 2007 16:19, Subbaiah Venkata wrote:
>
>Hello, I fixed and tested a small bug in lib/sort.c file, heap sort
>function.
>
>The fix avoids unnecessary swap of contents when i is 0 (saves few
>loads and stores), which happens every time sort function is called.
>I felt the fix is worth bringing it to your attention given the
>importance and frequent use of the sort function.

Would you like to resubmit this? Please do ;)
(I am hinting at Documentation/SubmittingPatches too..)


>==================================================================
>diff --git a/lib/sort.c b/lib/sort.c
>index 9615678..6abbaf3 100644
>--- a/lib/sort.c
>+++ b/lib/sort.c
>@@ -67,7 +67,7 @@ void sort(void *base, size_t num, size_t size,
>        }
>
>        /* sort */
>-       for (i = n - size; i >= 0; i -= size) {
>+       for (i = n - size; i > 0; i -= size) {
>                swap(base, base + i, size);
>                for (r = 0; r * 2 + size < i; r = c) {
>                        c = r * 2 + size;
>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ