public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Paul Eggert <eggert@cs.ucla.edu>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v2] time: Set daylight to 1 for matching DST/offset change (bug 29951)
Date: Thu, 05 Jan 2023 18:54:14 +0100	[thread overview]
Message-ID: <87sfgolveh.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <6cead8fd-0a88-a04a-dfac-f55c201f7027@cs.ucla.edu> (Paul Eggert's message of "Mon, 2 Jan 2023 11:09:03 -0800")

* Paul Eggert:

> 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.

Thanks, I've pushed it with this change.

Florian


      reply	other threads:[~2023-01-05 17:54 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
2023-01-05 17:54   ` Florian Weimer [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=87sfgolveh.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=eggert@cs.ucla.edu \
    --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).