diff options
author | Holger Weiss <hweiss@users.sourceforge.net> | 2007-03-31 17:29:50 +0000 |
---|---|---|
committer | Holger Weiss <hweiss@users.sourceforge.net> | 2007-03-31 17:29:50 +0000 |
commit | 7770530829708d091629a71abcdba808ab73f830 (patch) | |
tree | b80c7e48bcbd7f5c9fe7f478664f9962d6a8da49 /plugins | |
parent | 180ce88b3fd5ce4e0694f0e79addac5a177204e1 (diff) | |
download | monitoring-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
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_ntp.c | 2 |
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); |