summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/check_ntp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index 26543f4..d6e1dd5 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -191,7 +191,7 @@ typedef struct {
191 do{ if(!t.tv_usec && !t.tv_sec) n=0x0UL; \ 191 do{ if(!t.tv_usec && !t.tv_sec) n=0x0UL; \
192 else { \ 192 else { \
193 L32(n)=htonl(t.tv_sec + EPOCHDIFF); \ 193 L32(n)=htonl(t.tv_sec + EPOCHDIFF); \
194 R32(n)=htonl((4294.967296*t.tv_usec)+.5); \ 194 R32(n)=htonl((uint64_t)((4294.967296*t.tv_usec)+.5)); \
195 } \ 195 } \
196 } while(0) 196 } while(0)
197 197
@@ -287,7 +287,7 @@ void setup_request(ntp_message *p){
287 VN_SET(p->flags, 4); 287 VN_SET(p->flags, 4);
288 MODE_SET(p->flags, MODE_CLIENT); 288 MODE_SET(p->flags, MODE_CLIENT);
289 p->poll=4; 289 p->poll=4;
290 p->precision=0xfa; 290 p->precision=(int8_t)0xfa;
291 L16(p->rtdelay)=htons(1); 291 L16(p->rtdelay)=htons(1);
292 L16(p->rtdisp)=htons(1); 292 L16(p->rtdisp)=htons(1);
293 293
@@ -541,7 +541,7 @@ double jitter_request(const char *host, int *status){
541 */ 541 */
542 npeers+=(ntohs(req.count)/sizeof(ntp_assoc_status_pair)); 542 npeers+=(ntohs(req.count)/sizeof(ntp_assoc_status_pair));
543 peers=(ntp_assoc_status_pair*)realloc(peers, sizeof(ntp_assoc_status_pair)*npeers); 543 peers=(ntp_assoc_status_pair*)realloc(peers, sizeof(ntp_assoc_status_pair)*npeers);
544 memcpy((void*)peers+peer_offset, (void*)req.data, sizeof(ntp_assoc_status_pair)*npeers); 544 memcpy((void*)((ptrdiff_t)peers+peer_offset), (void*)req.data, sizeof(ntp_assoc_status_pair)*npeers);
545 peer_offset+=ntohs(req.count); 545 peer_offset+=ntohs(req.count);
546 } while(req.op&REM_MORE); 546 } while(req.op&REM_MORE);
547 547