about summary refs log tree commit diff
path: root/src/libstddjb/ntp_from_tain.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/ntp_from_tain.c')
-rw-r--r--src/libstddjb/ntp_from_tain.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstddjb/ntp_from_tain.c b/src/libstddjb/ntp_from_tain.c
index 85a338a..5fc0a57 100644
--- a/src/libstddjb/ntp_from_tain.c
+++ b/src/libstddjb/ntp_from_tain.c
@@ -12,9 +12,9 @@ int ntp_from_tain (uint64_t *u, tain const *a)
   secs += NTP_OFFSET ;
   if (secs < TAI_MAGIC + 2147483648UL) goto ifail ;
   secs -= TAI_MAGIC ;
-  if (secs >= ((uint64)3 << 31)) goto ifail ;
-  secs &= (secs < ((uint64)1 << 32)) ? 0xFFFFFFFFUL : 0x7FFFFFFFUL ;
-  frac = ((uint64)a->nano << 32) / 1000000000UL ;
+  if (secs >= ((uint64_t)3 << 31)) goto ifail ;
+  secs &= (secs < ((uint64_t)1 << 32)) ? 0xFFFFFFFFUL : 0x7FFFFFFFUL ;
+  frac = ((uint64_t)a->nano << 32) / 1000000000UL ;
   *u = (secs << 32) + frac ;
   return 1 ;
  ifail: