diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 20:42:25 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 20:42:25 +0200 |
commit | c2ceefd783043235ac24aa4f529bb42c95df905c (patch) | |
tree | c6a319d8a85cb404f422bd3f408a0fb3fe1a04a8 | |
parent | fd67d1e344c579fea0a0499a6700987f3866b0b1 (diff) | |
download | monitoring-plugins-c2ceefd783043235ac24aa4f529bb42c95df905c.tar.gz |
check_negate: Use C99 booleans
-rw-r--r-- | plugins/negate.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/negate.c b/plugins/negate.c index 50f62d33..79cca7e0 100644 --- a/plugins/negate.c +++ b/plugins/negate.c | |||
@@ -47,7 +47,7 @@ static const char **process_arguments (int, char **); | |||
47 | void validate_arguments (char **); | 47 | void validate_arguments (char **); |
48 | void print_help (void); | 48 | void print_help (void); |
49 | void print_usage (void); | 49 | void print_usage (void); |
50 | int subst_text = FALSE; | 50 | bool subst_text = false; |
51 | 51 | ||
52 | static int state[4] = { | 52 | static int state[4] = { |
53 | STATE_OK, | 53 | STATE_OK, |
@@ -122,7 +122,7 @@ static const char ** | |||
122 | process_arguments (int argc, char **argv) | 122 | process_arguments (int argc, char **argv) |
123 | { | 123 | { |
124 | int c; | 124 | int c; |
125 | int permute = TRUE; | 125 | bool permute = true; |
126 | 126 | ||
127 | int option = 0; | 127 | int option = 0; |
128 | static struct option longopts[] = { | 128 | static struct option longopts[] = { |
@@ -168,26 +168,26 @@ process_arguments (int argc, char **argv) | |||
168 | case 'o': /* replacement for OK */ | 168 | case 'o': /* replacement for OK */ |
169 | if ((state[STATE_OK] = mp_translate_state(optarg)) == ERROR) | 169 | if ((state[STATE_OK] = mp_translate_state(optarg)) == ERROR) |
170 | usage4 (_("Ok must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); | 170 | usage4 (_("Ok must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); |
171 | permute = FALSE; | 171 | permute = false; |
172 | break; | 172 | break; |
173 | 173 | ||
174 | case 'w': /* replacement for WARNING */ | 174 | case 'w': /* replacement for WARNING */ |
175 | if ((state[STATE_WARNING] = mp_translate_state(optarg)) == ERROR) | 175 | if ((state[STATE_WARNING] = mp_translate_state(optarg)) == ERROR) |
176 | usage4 (_("Warning must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); | 176 | usage4 (_("Warning must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); |
177 | permute = FALSE; | 177 | permute = false; |
178 | break; | 178 | break; |
179 | case 'c': /* replacement for CRITICAL */ | 179 | case 'c': /* replacement for CRITICAL */ |
180 | if ((state[STATE_CRITICAL] = mp_translate_state(optarg)) == ERROR) | 180 | if ((state[STATE_CRITICAL] = mp_translate_state(optarg)) == ERROR) |
181 | usage4 (_("Critical must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); | 181 | usage4 (_("Critical must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); |
182 | permute = FALSE; | 182 | permute = false; |
183 | break; | 183 | break; |
184 | case 'u': /* replacement for UNKNOWN */ | 184 | case 'u': /* replacement for UNKNOWN */ |
185 | if ((state[STATE_UNKNOWN] = mp_translate_state(optarg)) == ERROR) | 185 | if ((state[STATE_UNKNOWN] = mp_translate_state(optarg)) == ERROR) |
186 | usage4 (_("Unknown must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); | 186 | usage4 (_("Unknown must be a valid state name (OK, WARNING, CRITICAL, UNKNOWN) or integer (0-3).")); |
187 | permute = FALSE; | 187 | permute = false; |
188 | break; | 188 | break; |
189 | case 's': /* Substitute status text */ | 189 | case 's': /* Substitute status text */ |
190 | subst_text = TRUE; | 190 | subst_text = true; |
191 | break; | 191 | break; |
192 | } | 192 | } |
193 | } | 193 | } |