[Nagiosplug-checkins] nagiosplug/plugins check_ntp.c,1.15,1.16
Holger Weiss
hweiss at users.sourceforge.net
Sat Mar 31 19:29:52 CEST 2007
Update of /cvsroot/nagiosplug/nagiosplug/plugins
In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv2940
Modified Files:
check_ntp.c
Log Message:
Avoid division by zero.
Index: check_ntp.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_ntp.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- check_ntp.c 31 Mar 2007 17:25:43 -0000 1.15
+++ check_ntp.c 31 Mar 2007 17:29:50 -0000 1.16
@@ -608,7 +608,7 @@
}
}
- rval /= num_valid;
+ rval = num_valid ? rval / num_valid : -1.0;
close(conn);
free(peers);
More information about the Commits
mailing list