Re: openssh portable on FreeBSD i386

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Thu, 01 Jun 2023 18:50:42 +0200, Thorsten Glaser wrote:

> For OpenSSH itself, sure. For portable OpenSSH that’s not an option;
> time_t can be unsigned, signed, or even float.
>
> Another option would be to make the variable also time_t, but that
> would waste much space on contemporary platforms due to Y2038, so
> I think that, here, the cast is better.

POSIX stopped allowing time_t to be floating point some time ago
(and I don't think anyone ever implemented it that way) but that
is completely irrelevant to the diff at hand.

Even if time_t was unsigned, this would not be a problem for the
comparison in question.  The result of "c->lastused + c->inactive_deadline"
would be unsigned if time_t is unsigned so there is no need to cast
c->inactive_deadline that I can see.

 - todd
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux