Index | Thread | Search

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

Download raw body.

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