From: Paul Eggert <eggert@cs.ucla.edu>
To: Florian Weimer <fweimer@redhat.com>, libc-alpha@sourceware.org
Subject: Re: [PATCH v2] time: Set daylight to 1 for matching DST/offset change (bug 29951)
Date: Mon, 2 Jan 2023 11:09:03 -0800 [thread overview]
Message-ID: <6cead8fd-0a88-a04a-dfac-f55c201f7027@cs.ucla.edu> (raw)
In-Reply-To: <87mt71p2t2.fsf@oldenburg.str.redhat.com>
On 2023-01-02 03:56, Florian Weimer via Libc-alpha wrote:
> if (num_transitions == 0)
> /* Use the first rule (which should also be the only one). */
> - rule_stdoff = rule_dstoff = types[0].offset;
> + {
> + rule_stdoff = rule_dstoff = types[0].offset;
> + daylight_saved = 0;
> + }
> else
> {
> - int stdoff_set = 0, dstoff_set = 0;
> - rule_stdoff = rule_dstoff = 0;
> + daylight_saved = 0;
I would hoist the "daylight_saved = 0;" out of the then- and else-parts,
to avoid code duplication. Otherwise the patch looks good to me; thanks.
next prev parent reply other threads:[~2023-01-02 19:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-02 11:56 Florian Weimer
2023-01-02 19:09 ` Paul Eggert [this message]
2023-01-05 17:54 ` Florian Weimer
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=6cead8fd-0a88-a04a-dfac-f55c201f7027@cs.ucla.edu \
--to=eggert@cs.ucla.edu \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).