From 7770530829708d091629a71abcdba808ab73f830 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Sat, 31 Mar 2007 17:29:50 +0000 Subject: Avoid division by zero. git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1664 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_ntp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') 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); -- cgit v1.2.3-74-g34f1