diff options
author | glebius <glebius@FreeBSD.org> | 2016-01-11 01:09:50 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2016-01-11 01:09:50 +0000 |
commit | c41fbaf9bc76f0b7650e448fbd88d0a9815f47fd (patch) | |
tree | 3b45c8e63a37b132f0fe10c570b8302052c547de /contrib/ntp/libntp/dolfptoa.c | |
parent | 3066f138bc3bf99f5cf6ec9412903d206c329cc7 (diff) | |
download | FreeBSD-src-c41fbaf9bc76f0b7650e448fbd88d0a9815f47fd.zip FreeBSD-src-c41fbaf9bc76f0b7650e448fbd88d0a9815f47fd.tar.gz |
Merge r293423, r293469:
ntp 4.2.8p5
Relnotes: yes
Diffstat (limited to 'contrib/ntp/libntp/dolfptoa.c')
-rw-r--r-- | contrib/ntp/libntp/dolfptoa.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/ntp/libntp/dolfptoa.c b/contrib/ntp/libntp/dolfptoa.c index 07ead95..68f56e1 100644 --- a/contrib/ntp/libntp/dolfptoa.c +++ b/contrib/ntp/libntp/dolfptoa.c @@ -40,7 +40,7 @@ dolfptoa( * including a possible rounding from the fractional part. */ cp = cpend = cpdec = &cbuf[10]; - for (dec = cp - cbuf; dec > 0 && fpi != 0; dec--) { + for (dec = (int)(cp - cbuf); dec > 0 && fpi != 0; dec--) { /* can add another digit */ u_int32 digit; @@ -62,7 +62,7 @@ dolfptoa( cpdec += 3; } if ((size_t)dec > sizeof(cbuf) - (cpend - cbuf)) - dec = sizeof(cbuf) - (cpend - cbuf); + dec = (int)(sizeof(cbuf) - (cpend - cbuf)); /* * If there's a fraction to deal with, do so. @@ -95,7 +95,7 @@ dolfptoa( u_char *tp = cpend; int carry = ((fpv & 0x80000000) != 0); - for (dec = tp - cbuf; carry && dec > 0; dec--) { + for (dec = (int)(tp - cbuf); carry && dec > 0; dec--) { *--tp += 1; if (*tp == 10) *tp = 0; |