summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-18 20:58:18 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2023-10-18 20:58:18 +0200
commit0722dbfb8ac7e2bd97bc134567f8ee9d5fa038de (patch)
tree7b1dc706e3e1d40b35ec306b9bc73933b93b7e3d
parent163ad151b91cafe6a0f06cb4f0583a97166b0614 (diff)
downloadmonitoring-plugins-0722dbfb8ac7e2bd97bc134567f8ee9d5fa038de.tar.gz
check_swap: Use C99 booleans
-rw-r--r--plugins/check_swap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c
index cd965e31..fddd93fa 100644
--- a/plugins/check_swap.c
+++ b/plugins/check_swap.c
@@ -65,7 +65,7 @@ void print_help (void);
65threshold_t warn; 65threshold_t warn;
66threshold_t crit; 66threshold_t crit;
67int verbose; 67int verbose;
68int allswaps; 68bool allswaps = false;
69int no_swap_state = STATE_CRITICAL; 69int no_swap_state = STATE_CRITICAL;
70 70
71int 71int
@@ -383,10 +383,10 @@ main (int argc, char **argv)
383 if (crit.is_percentage) crit_print = crit.value * (total_swap_mb *1024 *1024/100); 383 if (crit.is_percentage) crit_print = crit.value * (total_swap_mb *1024 *1024/100);
384 384
385 puts (perfdata_uint64 ("swap", free_swap_mb *1024 *1024, "B", 385 puts (perfdata_uint64 ("swap", free_swap_mb *1024 *1024, "B",
386 TRUE, warn_print, 386 true, warn_print,
387 TRUE, crit_print, 387 true, crit_print,
388 TRUE, 0, 388 true, 0,
389 TRUE, (long) total_swap_mb * 1024 * 1024)); 389 true, (long) total_swap_mb * 1024 * 1024));
390 390
391 return result; 391 return result;
392} 392}
@@ -514,7 +514,7 @@ process_arguments (int argc, char **argv)
514 } 514 }
515 } 515 }
516 case 'a': /* all swap */ 516 case 'a': /* all swap */
517 allswaps = TRUE; 517 allswaps = true;
518 break; 518 break;
519 case 'n': 519 case 'n':
520 if ((no_swap_state = mp_translate_state(optarg)) == ERROR) { 520 if ((no_swap_state = mp_translate_state(optarg)) == ERROR) {