[PATCH] Fix debug message in gencache
Volker Lendecke
Volker.Lendecke at SerNet.DE
Thu Jan 17 14:07:04 UTC 2019
On Thu, Jan 17, 2019 at 02:49:01PM +0100, Andreas Schneider wrote:
> On Thursday, January 17, 2019 2:12:59 PM CET Volker Lendecke wrote:
> > On Thu, Jan 17, 2019 at 02:05:27PM +0100, Andreas Schneider via samba-
> technical wrote:
> > > Hi,
> > >
> > > here is a small patch to fix a debug message.
> >
> > Looks good, RB+.
> >
> > Question: Why not cast to time_t?
>
> The value can be negative so we should use a signed integer space for the
> subtraction. Currently we do it in time_t and then cast it to int which
> results in a message:
>
> timeout (-1547089989 seconds in the past)
>
> which translates into roughly 17000 days. This is a bit much ...
Ok, right. Integer arithmetic is black art...
Volker
--
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: 0551-370000-0, mailto:kontakt at sernet.de
Gesch.F.: Dr. Johannes Loxen und Reinhild Jung
AG Göttingen: HR-B 2816 - http://www.sernet.de
More information about the samba-technical
mailing list