summaryrefslogtreecommitdiff
path: root/src/libstddjb/utc_from_tai.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstddjb/utc_from_tai.c')
-rw-r--r--src/libstddjb/utc_from_tai.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/libstddjb/utc_from_tai.c b/src/libstddjb/utc_from_tai.c
index 0b46721..a0e087e 100644
--- a/src/libstddjb/utc_from_tai.c
+++ b/src/libstddjb/utc_from_tai.c
@@ -6,9 +6,10 @@
int utc_from_tai (uint64_t *u, tai_t const *t)
{
+ int r = 1 ;
uint64_t tt = t->x - 10 ;
if (t->x < 10U) return (errno = EINVAL, 0) ;
- leapsecs_sub(&tt) ;
+ r += leapsecs_sub(&tt) ;
*u = tt ;
- return 1 ;
+ return r ;
}