From 5cd3cbd6fc6762869d6fc4ba15d26bcf861c1427 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 31 Jul 2018 19:59:58 +0200 Subject: noise: use hex constant for tai64n offset MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Suggested-by: Jonathan Neuschäfer --- src/noise.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/noise.c') diff --git a/src/noise.c b/src/noise.c index 84bde39..1a28b47 100644 --- a/src/noise.c +++ b/src/noise.c @@ -360,7 +360,7 @@ static void tai64n_now(u8 output[NOISE_TIMESTAMP_LEN]) getnstimeofday64(&now); /* https://cr.yp.to/libtai/tai64.html */ - *(__be64 *)output = cpu_to_be64(4611686018427387914ULL + now.tv_sec); + *(__be64 *)output = cpu_to_be64(0x400000000000000aULL + now.tv_sec); *(__be32 *)(output + sizeof(__be64)) = cpu_to_be32(now.tv_nsec); } -- cgit v1.2.3-59-g8ed1b