From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zimbra.cs.ucla.edu (zimbra.cs.ucla.edu [131.179.128.68]) by sourceware.org (Postfix) with ESMTPS id 1A2543858D32 for ; Mon, 2 Jan 2023 19:09:07 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1C0AF160043; Mon, 2 Jan 2023 11:09:06 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id DU4qr1WabLlp; Mon, 2 Jan 2023 11:09:03 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id C9B5F160044; Mon, 2 Jan 2023 11:09:03 -0800 (PST) DKIM-Filter: OpenDKIM Filter v2.9.2 zimbra.cs.ucla.edu C9B5F160044 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cs.ucla.edu; s=78364E5A-2AF3-11ED-87FA-8298ECA2D365; t=1672686543; bh=GeUkzvlG5/meRWNv2zWmkY5zINlj2j9o78jWSLMAj2s=; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type: Content-Transfer-Encoding; b=PZEFhFimSJXPXqqMKHBg5EzSlT9ukHgRkoAf0hAxR2VaRSvkQbxLYJ1AHf7b1OwPD nixzsWJoe09Skty6QSHbYJdnt8v2qyc/OE1JMpxQwt2xmC/YwUIT/AyeYUSjtJ9qYm Njd547KlilDfJ/gwIt44gMES6Ca7dXao4XdDcSZw= X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hF-Na94eymoB; Mon, 2 Jan 2023 11:09:03 -0800 (PST) Received: from [192.168.1.9] (cpe-172-91-119-151.socal.res.rr.com [172.91.119.151]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id A4552160043; Mon, 2 Jan 2023 11:09:03 -0800 (PST) Message-ID: <6cead8fd-0a88-a04a-dfac-f55c201f7027@cs.ucla.edu> Date: Mon, 2 Jan 2023 11:09:03 -0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v2] time: Set daylight to 1 for matching DST/offset change (bug 29951) Content-Language: en-US To: Florian Weimer , libc-alpha@sourceware.org References: <87mt71p2t2.fsf@oldenburg.str.redhat.com> From: Paul Eggert Organization: UCLA Computer Science Department In-Reply-To: <87mt71p2t2.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,JMQ_SPF_NEUTRAL,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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.