On 19.12.13 18:00, Stefan Esser wrote: > I'd replace the two occurances of LLONG_MAX with INT64_MAX and add the > missing empty line: > > static __inline sbintime_t > timer2sbintime(intptr_t data) > { > > if (data > INT64_MAX / SBT_1MS) > return INT64_MAX; > return (SBT_1MS * data); > } > > If you can show evidence that a limit of INT64_MAX/2 is more appropriate > (2^30 seconds or 34 years), the limit could be of course be reduced to > that value. > > I could not find any code that would not tolerate INT64_MAX, though ...
Aehm, what about 32-bit systems where intptr_t == __int32_t? cc1: warnings being treated as errors /export/devel/fbsd/src/sys/kern/kern_event.c: In function 'timer2sbintime': /export/devel/fbsd/src/sys/kern/kern_event.c:529: warning: comparison is always false due to limited range of data type Andreas _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"