From: cgit at cryptocrack.de (Lukas Fleischer)
Subject: [PATCH] ui-refs.c: Simplify and inline cmp_age()
Date: Tue, 04 Feb 2014 20:27:56 +0100 [thread overview]
Message-ID: <20140204192756.3523.57471@typhoon.lan> (raw)
In-Reply-To: <CAHmME9p1HYTBpihPzdzde5GMY7PkDQ7V_YADFi07OWpqARdcow@mail.gmail.com>
On Tue, 04 Feb 2014 at 20:26:32, Jason A. Donenfeld wrote:
> On Tue, Feb 4, 2014 at 8:22 PM, Lukas Fleischer <cgit at cryptocrack.de> wrote:
> >
> > return age2 - age1;
> > -static int cmp_age(int age1, int age2)
> > -{
> > - if (age1 != 0 && age2 != 0)
> > - return age2 - age1;
> > -
> > - if (age1 == 0 && age2 == 0)
> > - return 0;
> > -
> > - if (age1 == 0)
> > - return +1;
> > -
> > - return -1;
> > -}
>
>
> cmp_age(-1, 0) returns -1
>
> 0 - -1 returns 1
Can the age ever be negative?
next prev parent reply other threads:[~2014-02-04 19:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-04 19:22 cgit
2014-02-04 19:26 ` Jason
2014-02-04 19:27 ` Jason
2014-02-04 19:27 ` cgit [this message]
2014-02-04 19:36 ` cgit
[not found] ` <20140204200757.4882.92393@typhoon.lan>
2014-02-20 19:00 ` Jason
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=20140204192756.3523.57471@typhoon.lan \
--to=cgit@lists.zx2c4.com \
/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;
as well as URLs for NNTP newsgroup(s).