summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Weiss <hweiss@users.sourceforge.net>2007-03-31 17:29:50 (GMT)
committerHolger Weiss <hweiss@users.sourceforge.net>2007-03-31 17:29:50 (GMT)
commit7770530829708d091629a71abcdba808ab73f830 (patch)
treeb80c7e48bcbd7f5c9fe7f478664f9962d6a8da49
parent180ce88b3fd5ce4e0694f0e79addac5a177204e1 (diff)
downloadmonitoring-plugins-7770530829708d091629a71abcdba808ab73f830.tar.gz
Avoid division by zero.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1664 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--plugins/check_ntp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/check_ntp.c b/plugins/check_ntp.c
index 013c24b..861d0ba 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -608,7 +608,7 @@ double jitter_request(const char *host, int *status){
608 } 608 }
609 } 609 }
610 610
611 rval /= num_valid; 611 rval = num_valid ? rval / num_valid : -1.0;
612 612
613 close(conn); 613 close(conn);
614 free(peers); 614 free(peers);