From 0722dbfb8ac7e2bd97bc134567f8ee9d5fa038de Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:58:18 +0200 Subject: check_swap: Use C99 booleans diff --git a/plugins/check_swap.c b/plugins/check_swap.c index cd965e3..fddd93f 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c @@ -65,7 +65,7 @@ void print_help (void); threshold_t warn; threshold_t crit; int verbose; -int allswaps; +bool allswaps = false; int no_swap_state = STATE_CRITICAL; int @@ -383,10 +383,10 @@ main (int argc, char **argv) if (crit.is_percentage) crit_print = crit.value * (total_swap_mb *1024 *1024/100); puts (perfdata_uint64 ("swap", free_swap_mb *1024 *1024, "B", - TRUE, warn_print, - TRUE, crit_print, - TRUE, 0, - TRUE, (long) total_swap_mb * 1024 * 1024)); + true, warn_print, + true, crit_print, + true, 0, + true, (long) total_swap_mb * 1024 * 1024)); return result; } @@ -514,7 +514,7 @@ process_arguments (int argc, char **argv) } } case 'a': /* all swap */ - allswaps = TRUE; + allswaps = true; break; case 'n': if ((no_swap_state = mp_translate_state(optarg)) == ERROR) { -- cgit v0.10-9-g596f