[PATCH 6/9] mktime: do not assume signed right shift propagates sign bit

Roland McGrath roland@hack.frob.com
Wed May 23 18:37:00 GMT 2012


> +static int
> +isdst_differ (int a, int b)
> +{
> +  return (!a != !b) & (0 <= a) & (0 <= b);

It's bizarre that this uses & instead of &&, though they are equivalent in
this case.  Is it really an intended microoptimization for some compiler or
machine?  If so, please add a comment about it.  If not, just use &&.

Otherwise the change looks fine.



More information about the Libc-alpha mailing list