Download raw body.
kern_time: Use abs() to replace open code
On 9. Oct 2024, at 11:17, Theo Buehler wrote: > On Wed, Oct 09, 2024 at 08:15:01PM +1100, Jonathan Gray wrote: >> On Wed, Oct 09, 2024 at 08:45:27AM +0000, Miod Vallat wrote: >>>> + deltat = abs(rtctime.tv_sec - base); >>> >>> This function is not available in the kernel. >> >> it is in libkern.h, documented in abs(9) > > it's still wrong since it will truncate time_t to 32 bits. Ah sorry, I missed the int in the signature. Thanks.
kern_time: Use abs() to replace open code