diff options
Diffstat (limited to 'plugins/check_ntp_time.c')
-rw-r--r-- | plugins/check_ntp_time.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/check_ntp_time.c b/plugins/check_ntp_time.c index f414c328..767dcd94 100644 --- a/plugins/check_ntp_time.c +++ b/plugins/check_ntp_time.c | |||
@@ -274,7 +274,7 @@ int best_offset_server(const ntp_server_results *slist, int nservers){ | |||
274 | /* if we haven't reached the current list's end, move everyone | 274 | /* if we haven't reached the current list's end, move everyone |
275 | * over one to the right, and insert the new candidate */ | 275 | * over one to the right, and insert the new candidate */ |
276 | if(i<csize){ | 276 | if(i<csize){ |
277 | for(j=5; j>i; j--){ | 277 | for(j=4; j>i; j--){ |
278 | candidates[j]=candidates[j-1]; | 278 | candidates[j]=candidates[j-1]; |
279 | } | 279 | } |
280 | } | 280 | } |
@@ -337,6 +337,7 @@ double offset_request(const char *host, int *status){ | |||
337 | servers=(ntp_server_results*)malloc(sizeof(ntp_server_results)*num_hosts); | 337 | servers=(ntp_server_results*)malloc(sizeof(ntp_server_results)*num_hosts); |
338 | if(servers==NULL) die(STATE_UNKNOWN, "can not allocate server array"); | 338 | if(servers==NULL) die(STATE_UNKNOWN, "can not allocate server array"); |
339 | memset(servers, 0, sizeof(ntp_server_results)*num_hosts); | 339 | memset(servers, 0, sizeof(ntp_server_results)*num_hosts); |
340 | DBG(printf("Found %d peers to check\n", num_hosts)); | ||
340 | 341 | ||
341 | /* setup each socket for writing, and the corresponding struct pollfd */ | 342 | /* setup each socket for writing, and the corresponding struct pollfd */ |
342 | ai_tmp=ai; | 343 | ai_tmp=ai; |