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] [day] [month] [year] [list]
Date:   Sat, 9 Feb 2019 16:02:07 +0300
From:   Alexey Dobriyan <adobriyan@...il.com>
To:     Joe Perches <joe@...ches.com>
Cc:     akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] lib/string.c: make strncmp() smaller

On Fri, Feb 08, 2019 at 01:31:49AM -0800, Joe Perches wrote:
> On Fri, 2019-02-08 at 10:34 +0300, Alexey Dobriyan wrote:

> > -			return c1 < c2 ? -1 : 1;
> > +			return c1 - c2;
> 
> This does change the return value for most comparisons.

It does.

> Wasn't there a specific reason for -1 and 1?

Maybe. Spec says anything positive or negative works.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ