linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Joe Perches <joe@perches.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] lib/string.c: make strncmp() smaller
Date: Sat, 9 Feb 2019 16:02:07 +0300	[thread overview]
Message-ID: <20190209130207.GA11988@avx2> (raw)
In-Reply-To: <061655a972b4037b5bf245a65aed937967410e61.camel@perches.com>

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.

      reply	other threads:[~2019-02-09 13:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08  7:34 Alexey Dobriyan
2019-02-08  9:31 ` Joe Perches
2019-02-09 13:02   ` Alexey Dobriyan [this message]

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=20190209130207.GA11988@avx2 \
    --to=adobriyan@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] lib/string.c: make strncmp() smaller' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).