summaryrefslogtreecommitdiffhomepage
path: root/src/noise.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-07-31 19:59:58 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-07-31 19:59:58 +0200
commit008318185bd061a9d0496cc266d055fa5a9cf314 (patch)
treeba51bd2e23842ba9e8114a49fdf643ec36d5a80d /src/noise.c
parent51f00a42f66099535c7c526d4c58acd5e9bb17fe (diff)
noise: use hex constant for tai64n offset
Suggested-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/noise.c')
-rw-r--r--src/noise.c2
1 files changed, 1 insertions, 1 deletions
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);
}