From 381715a2bd1f9163b791dc2a12ef8c60bac2c19a Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Sat, 27 Jan 2007 21:49:21 +0000 Subject: Fix #1643463: Miscalculating thresholds check_disk git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1589 f882894a-f735-0410-b71e-b25c423dba1c --- plugins/check_disk.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins/check_disk.c') diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 99a7201e..476c8922 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c @@ -306,16 +306,16 @@ main (int argc, char **argv) critical_high_tide = UINT_MAX; if (path->freespace_units->warning != NULL) { - warning_high_tide = dtotal_units - path->freespace_units->warning->end; + warning_high_tide = path->freespace_units->warning->end; } if (path->freespace_percent->warning != NULL) { - warning_high_tide = abs( min( (double) warning_high_tide, (double) (1.0 - path->freespace_percent->warning->end/100)*dtotal_units )); + warning_high_tide = abs( min( (double) warning_high_tide, (double) path->freespace_percent->warning->end/100*dtotal_units )); } if (path->freespace_units->critical != NULL) { - critical_high_tide = dtotal_units - path->freespace_units->critical->end; + critical_high_tide = path->freespace_units->critical->end; } if (path->freespace_percent->critical != NULL) { - critical_high_tide = abs( min( (double) critical_high_tide, (double) (1.0 - path->freespace_percent->critical->end/100)*dtotal_units )); + critical_high_tide = abs( min( (double) critical_high_tide, (double) path->freespace_percent->critical->end/100*dtotal_units )); } asprintf (&perf, "%s %s", perf, -- cgit v1.2.3