Module: monitoring-plugins
Branch: check_disk-compiler_warnings
Commit: f810e02a458f6ee70db3e44562ae7ee561848646
Author: RincewindsHat <[email protected]>
Date: Sat Mar 26 15:09:39 2022 +0100
URL:
https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=f810e02
Use proper functions for absolute values
---
plugins/check_disk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/check_disk.c b/plugins/check_disk.c
index 10768f8..75d5486 100644
--- a/plugins/check_disk.c
+++ b/plugins/check_disk.c
@@ -368,10 +368,10 @@ main (int argc, char **argv)
critical_high_tide = UINT64_MAX;
if (path->freeinodes_percent->warning != NULL) {
- warning_high_tide = llabs( min( (double) warning_high_tide, (double)
(1.0 - path->freeinodes_percent->warning->end/100)*path->inodes_total ));
+ warning_high_tide = (uint64_t) fabs( min( (double)
warning_high_tide, (double) (1.0 -
path->freeinodes_percent->warning->end/100)*path->inodes_total ));
}
if (path->freeinodes_percent->critical != NULL) {
- critical_high_tide = llabs( min( (double) critical_high_tide,
(double) (1.0 - path->freeinodes_percent->critical->end/100)*path->inodes_total
));
+ critical_high_tide = (uint64_t) fabs( min( (double)
critical_high_tide, (double) (1.0 -
path->freeinodes_percent->critical->end/100)*path->inodes_total ));
}
xasprintf (&perf_ilabel, "%s (inodes)", (!strcmp(me->me_mountdir,
"none") || display_mntp) ? me->me_devname : me->me_mountdir);