diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2022-03-26 15:09:39 +0100 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2022-03-26 15:09:39 +0100 |
commit | f810e02a458f6ee70db3e44562ae7ee561848646 (patch) | |
tree | 02af645a79691ae7f371e7ad4d0f50955bc10711 /plugins | |
parent | 08df04c1708cddca0bffdea5124928ba5807f578 (diff) | |
download | monitoring-plugins-f810e02.tar.gz |
Use proper functions for absolute values
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/check_disk.c b/plugins/check_disk.c index 10768f83..75d5486c 100644 --- a/plugins/check_disk.c +++ b/plugins/check_disk.c | |||
@@ -368,10 +368,10 @@ main (int argc, char **argv) | |||
368 | critical_high_tide = UINT64_MAX; | 368 | critical_high_tide = UINT64_MAX; |
369 | 369 | ||
370 | if (path->freeinodes_percent->warning != NULL) { | 370 | if (path->freeinodes_percent->warning != NULL) { |
371 | warning_high_tide = llabs( min( (double) warning_high_tide, (double) (1.0 - path->freeinodes_percent->warning->end/100)*path->inodes_total )); | 371 | warning_high_tide = (uint64_t) fabs( min( (double) warning_high_tide, (double) (1.0 - path->freeinodes_percent->warning->end/100)*path->inodes_total )); |
372 | } | 372 | } |
373 | if (path->freeinodes_percent->critical != NULL) { | 373 | if (path->freeinodes_percent->critical != NULL) { |
374 | critical_high_tide = llabs( min( (double) critical_high_tide, (double) (1.0 - path->freeinodes_percent->critical->end/100)*path->inodes_total )); | 374 | critical_high_tide = (uint64_t) fabs( min( (double) critical_high_tide, (double) (1.0 - path->freeinodes_percent->critical->end/100)*path->inodes_total )); |
375 | } | 375 | } |
376 | 376 | ||
377 | xasprintf (&perf_ilabel, "%s (inodes)", (!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir); | 377 | xasprintf (&perf_ilabel, "%s (inodes)", (!strcmp(me->me_mountdir, "none") || display_mntp) ? me->me_devname : me->me_mountdir); |