X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fntpd.c;h=48d7aa7209b29b6675fba8fbc26f8697095475b3;hb=1b10ab706f8b70ce2f086e59a54cc09d671ad989;hp=a19d05c106a13fc858abf09dc485ed13acd4effa;hpb=4380983e0a45e2d1c1207dbea95863d1dcc844c6;p=collectd.git diff --git a/src/ntpd.c b/src/ntpd.c index a19d05c1..48d7aa72 100644 --- a/src/ntpd.c +++ b/src/ntpd.c @@ -846,9 +846,9 @@ static int ntpd_read(void) { } /* kerninfo -> estimated error */ - offset_loop = scale_loop * ((gauge_t)ntohl(ik->offset)); + offset_loop = (gauge_t)((int32_t)ntohl(ik->offset) * scale_loop); freq_loop = ntpd_read_fp(ik->freq); - offset_error = scale_error * ((gauge_t)ntohl(ik->esterror)); + offset_error = (gauge_t)((int32_t)ntohl(ik->esterror) * scale_error); DEBUG("info_kernel:\n" " pll offset = %.8g\n"