[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] mktime: systematically normalize tm_isdst comparisons
From: |
Eric Blake |
Subject: |
Re: [PATCH] mktime: systematically normalize tm_isdst comparisons |
Date: |
Mon, 31 Jan 2011 07:47:55 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.7 |
On 01/30/2011 12:02 AM, Paul Eggert wrote:
> +/* Return 1 if the values A and B differ according to the rules for
> + tm_isdst: A and B differ if one is zero and the other positive. */
> +static int
> +isdst_differ (int a, int b)
> +{
> + return (!a != !b) & (0 <= a) & (0 <= b);
Is it any more efficient to use short-circuiting operators here (&&
instead of &)?
--
Eric Blake address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature