diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-12-13 09:23:48 +0100 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-12-20 10:02:47 +0100 |
commit | 42f5f165787119a3c185f935ae2343de55736385 (patch) | |
tree | 22bd0225f57e82dc466966f692db8c2253df4a44 /plugins | |
parent | 0445456e8bf086a61fee281e73099b761963c46f (diff) | |
download | monitoring-plugins-42f5f165787119a3c185f935ae2343de55736385.tar.gz |
check_swap: Change another fake boolen to a real one
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/check_swap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/check_swap.c b/plugins/check_swap.c index fddd93fa..1a7011c0 100644 --- a/plugins/check_swap.c +++ b/plugins/check_swap.c | |||
@@ -52,7 +52,7 @@ const char *email = "devel@monitoring-plugins.org"; | |||
52 | #endif | 52 | #endif |
53 | 53 | ||
54 | typedef struct { | 54 | typedef struct { |
55 | int is_percentage; | 55 | bool is_percentage; |
56 | uint64_t value; | 56 | uint64_t value; |
57 | } threshold_t; | 57 | } threshold_t; |
58 | 58 | ||
@@ -465,7 +465,7 @@ process_arguments (int argc, char **argv) | |||
465 | 465 | ||
466 | if (optarg[length - 1] == '%') { | 466 | if (optarg[length - 1] == '%') { |
467 | /* It's percentage */ | 467 | /* It's percentage */ |
468 | warn.is_percentage = 1; | 468 | warn.is_percentage = true; |
469 | optarg[length - 1] = '\0'; | 469 | optarg[length - 1] = '\0'; |
470 | if (is_uint64(optarg, &warn.value)) { | 470 | if (is_uint64(optarg, &warn.value)) { |
471 | if (warn.value > 100) { | 471 | if (warn.value > 100) { |
@@ -475,7 +475,7 @@ process_arguments (int argc, char **argv) | |||
475 | break; | 475 | break; |
476 | } else { | 476 | } else { |
477 | /* It's Bytes */ | 477 | /* It's Bytes */ |
478 | warn.is_percentage = 0; | 478 | warn.is_percentage = false; |
479 | if (is_uint64(optarg, &warn.value)) { | 479 | if (is_uint64(optarg, &warn.value)) { |
480 | break; | 480 | break; |
481 | } else { | 481 | } else { |
@@ -495,7 +495,7 @@ process_arguments (int argc, char **argv) | |||
495 | 495 | ||
496 | if (optarg[length - 1] == '%') { | 496 | if (optarg[length - 1] == '%') { |
497 | /* It's percentage */ | 497 | /* It's percentage */ |
498 | crit.is_percentage = 1; | 498 | crit.is_percentage = true; |
499 | optarg[length - 1] = '\0'; | 499 | optarg[length - 1] = '\0'; |
500 | if (is_uint64(optarg, &crit.value)) { | 500 | if (is_uint64(optarg, &crit.value)) { |
501 | if (crit.value> 100) { | 501 | if (crit.value> 100) { |
@@ -505,7 +505,7 @@ process_arguments (int argc, char **argv) | |||
505 | break; | 505 | break; |
506 | } else { | 506 | } else { |
507 | /* It's Bytes */ | 507 | /* It's Bytes */ |
508 | crit.is_percentage = 0; | 508 | crit.is_percentage = false; |
509 | if (is_uint64(optarg, &crit.value)) { | 509 | if (is_uint64(optarg, &crit.value)) { |
510 | break; | 510 | break; |
511 | } else { | 511 | } else { |