]> git.ipfire.org Git - thirdparty/openvpn.git/commit
Cast time_t to long long in order to print it.
authorJeremie Courreges-Anglas <jca@wxcvbn.org>
Wed, 4 Oct 2017 23:43:33 +0000 (01:43 +0200)
committerGert Doering <gert@greenie.muc.de>
Sat, 4 Nov 2017 18:09:27 +0000 (19:09 +0100)
commit4ac769fb848619dcb39589af29302d8c2d698258
tree3527c54be79c477b1c157f9ccec413047ed6e087
parent6b5dbf6c8da0ff82fa1dca4eb4665be0a4fe31d3
Cast time_t to long long in order to print it.

time_t is only specified as an integer type per POSIX.  To reliably
print it, better cast it to "long long", which is at least 64 bits wide
and can represent values beyond 2038.

Printing as a "long" could cause problems on ILP32 systems using a 64
bits time_t (eg OpenBSD/armv7).

Signed-off-by: Jeremie Courreges-Anglas <jca@wxcvbn.org>
Acked-by: Steffan Karger <steffan.karger@fox-it.com>
Message-Id: <87efq4havl.fsf@ritchie.wxcvbn.org>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg15640.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
src/openvpn/error.c