aboutsummaryrefslogtreecommitdiffstats
path: root/libntp/timexsup.c
diff options
context:
space:
mode:
Diffstat (limited to 'libntp/timexsup.c')
-rw-r--r--libntp/timexsup.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/libntp/timexsup.c b/libntp/timexsup.c
index 498961f3b3c7..979a7c4aea8e 100644
--- a/libntp/timexsup.c
+++ b/libntp/timexsup.c
@@ -27,13 +27,13 @@ clamp_rounded(
dval = floor(dval + 0.5);
/* clamp / saturate */
- if (dval >= LONG_MAX)
+ if (dval >= (double)LONG_MAX)
return LONG_MAX;
- if (dval <= LONG_MIN)
+ if (dval <= (double)LONG_MIN)
return LONG_MIN;
return (long)dval;
-
}
+
double
dbl_from_var_long(
long lval,
@@ -80,4 +80,3 @@ usec_long_from_dbl(
{
return clamp_rounded(dval * 1e+6);
}
-