aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Holger Weiss <hweiss@users.sourceforge.net> 2007-03-31 17:29:50 +0000
committerGravatar Holger Weiss <hweiss@users.sourceforge.net> 2007-03-31 17:29:50 +0000
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 013c24bb..861d0ba4 100644
--- a/plugins/check_ntp.c
+++ b/plugins/check_ntp.c
@@ -608,7 +608,7 @@ double jitter_request(const char *host, int *status){
}
}
- rval /= num_valid;
+ rval = num_valid ? rval / num_valid : -1.0;
close(conn);
free(peers);