[Openais] [corosync] [patch] - Use clock_gettime for timers

Jim Meyering jim at meyering.net
Wed Jul 22 09:53:41 PDT 2009


Jan Friesse wrote:
>> 5)
>> +	nano_monotonic_hz = ts.tv_sec + 1000000000ULL / (unsigned long
>> long )ts.

BTW, that cast appears to be unnecessary, since
the value (ts.tv_nsec, I presume) will be promoted to the width
of the other argument to "/", which is already ULL.

Remember: all casts are bad.
Unnecessary ones are particularly evil ;-)


More information about the Openais mailing list