diff options
author | Cy Schubert <cy@FreeBSD.org> | 2020-06-24 00:20:45 +0000 |
---|---|---|
committer | Cy Schubert <cy@FreeBSD.org> | 2020-06-24 00:20:45 +0000 |
commit | 3914721463f70500ecc1f59312b122d8788465cf (patch) | |
tree | f253e72838d762e229ca71912a4a928e96cac2bd /libntp/timexsup.c | |
parent | 5171bc9b11192d9ad273db7854787eaa65eb9997 (diff) |
Notes
Diffstat (limited to 'libntp/timexsup.c')
-rw-r--r-- | libntp/timexsup.c | 7 |
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); } - |