From: "Helge Hafting" <helge.hafting@daldata.no>
To: Ian McKellar <imckellar@harvestroad.com.au>
Cc: linux-kernel@vger.rutgers.edu
Subject: Re: Non-urgent issue with fs/isofs/util.c
Date: Fri, 18 Sep 1998 10:34:15 +0100 [thread overview]
Message-ID: <19980918083130171.AAA288.91@HELGES_PC> (raw)
In-Reply-To: <19980918151457.C9740@harvestroad.com.au>
In <19980918151457.C9740@harvestroad.com.au>, on 09/18/98
at 03:14 PM, Ian McKellar <imckellar@harvestroad.com.au> said:
>Hi,
>The iso_date function in fs/isofs/util.c doesn't correctly handle leap
>years.
>Well, it doesn't handle the year 2100 - which according to the code is a
>leap year, but according to the commonly accepted rules is not.
>I don't think we need to be to concerned right now, but changing:
> if (((year+2) % 4) == 0 && month > 2)
>to:
> if (((year+2) % 4) == 0 && month > 2 && year != 130) should
>fix it.
The equivalent code
if (!((year+2) & 3) && month > 2 && year != 130) is probably
faster. The somewhat expensive mod operator is
replaced by a bitwise "and", that is faster on most platforms.
Helge Hafting
--
-----------------------------------------------------------
helge.hafting@daldata.no
-----------------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
parent reply other threads:[~1998-09-18 5:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <19980918151457.C9740@harvestroad.com.au>]
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=19980918083130171.AAA288.91@HELGES_PC \
--to=helge.hafting@daldata.no \
--cc=imckellar@harvestroad.com.au \
--cc=linux-kernel@vger.rutgers.edu \
/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