Index | Thread | Search

From:
Thorsten Blum <thorsten.blum@toblux.com>
Subject:
Re: kern_time: Use abs() to replace open code
To:
Theo Buehler <tb@theobuehler.org>
Cc:
Miod Vallat <miod@online.fr>, tech@openbsd.org
Date:
Wed, 9 Oct 2024 11:24:24 +0200

Download raw body.

Thread
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.