Module Name: src
Committed By: christos
Date: Fri May 29 20:15:14 UTC 2020
Modified Files:
src/external/bsd/ntp/dist/libntp: timexsup.c
Log Message:
Add explicit casts
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/ntp/dist/libntp/timexsup.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/ntp/dist/libntp/timexsup.c
diff -u src/external/bsd/ntp/dist/libntp/timexsup.c:1.2 src/external/bsd/ntp/dist/libntp/timexsup.c:1.3
--- src/external/bsd/ntp/dist/libntp/timexsup.c:1.2 Mon May 25 16:47:24 2020
+++ src/external/bsd/ntp/dist/libntp/timexsup.c Fri May 29 16:15:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: timexsup.c,v 1.2 2020/05/25 20:47:24 christos Exp $ */
+/* $NetBSD: timexsup.c,v 1.3 2020/05/29 20:15:14 christos Exp $ */
/*
* timexsup.c - 'struct timex' support functions
@@ -30,9 +30,9 @@ 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;