diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 20:19:35 +0200 |
---|---|---|
committer | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-18 20:19:35 +0200 |
commit | 9ccb98aeb5fac426b41c4ed976e4b6a707da509f (patch) | |
tree | c2940768fb75e3fbe0bc20172b7d3475966863b5 /plugins/check_real.c | |
parent | 555902bf7664838ef274899dea10f2fa7f52b8de (diff) | |
download | monitoring-plugins-9ccb98aeb5fac426b41c4ed976e4b6a707da509f.tar.gz |
check_real: Use C99 booleans
Diffstat (limited to 'plugins/check_real.c')
-rw-r--r-- | plugins/check_real.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/plugins/check_real.c b/plugins/check_real.c index fbdb70f3..15e035b6 100644 --- a/plugins/check_real.c +++ b/plugins/check_real.c | |||
@@ -54,10 +54,10 @@ char *host_name; | |||
54 | char *server_url = NULL; | 54 | char *server_url = NULL; |
55 | char *server_expect; | 55 | char *server_expect; |
56 | int warning_time = 0; | 56 | int warning_time = 0; |
57 | int check_warning_time = FALSE; | 57 | bool check_warning_time = false; |
58 | int critical_time = 0; | 58 | int critical_time = 0; |
59 | int check_critical_time = FALSE; | 59 | bool check_critical_time = false; |
60 | int verbose = FALSE; | 60 | bool verbose = false; |
61 | 61 | ||
62 | 62 | ||
63 | 63 | ||
@@ -238,9 +238,9 @@ main (int argc, char **argv) | |||
238 | /* Return results */ | 238 | /* Return results */ |
239 | if (result == STATE_OK) { | 239 | if (result == STATE_OK) { |
240 | 240 | ||
241 | if (check_critical_time == TRUE | 241 | if (check_critical_time |
242 | && (end_time - start_time) > critical_time) result = STATE_CRITICAL; | 242 | && (end_time - start_time) > critical_time) result = STATE_CRITICAL; |
243 | else if (check_warning_time == TRUE | 243 | else if (check_warning_time |
244 | && (end_time - start_time) > warning_time) result = | 244 | && (end_time - start_time) > warning_time) result = |
245 | STATE_WARNING; | 245 | STATE_WARNING; |
246 | 246 | ||
@@ -331,7 +331,7 @@ process_arguments (int argc, char **argv) | |||
331 | case 'w': /* warning time threshold */ | 331 | case 'w': /* warning time threshold */ |
332 | if (is_intnonneg (optarg)) { | 332 | if (is_intnonneg (optarg)) { |
333 | warning_time = atoi (optarg); | 333 | warning_time = atoi (optarg); |
334 | check_warning_time = TRUE; | 334 | check_warning_time = true; |
335 | } | 335 | } |
336 | else { | 336 | else { |
337 | usage4 (_("Warning time must be a positive integer")); | 337 | usage4 (_("Warning time must be a positive integer")); |
@@ -340,14 +340,14 @@ process_arguments (int argc, char **argv) | |||
340 | case 'c': /* critical time threshold */ | 340 | case 'c': /* critical time threshold */ |
341 | if (is_intnonneg (optarg)) { | 341 | if (is_intnonneg (optarg)) { |
342 | critical_time = atoi (optarg); | 342 | critical_time = atoi (optarg); |
343 | check_critical_time = TRUE; | 343 | check_critical_time = true; |
344 | } | 344 | } |
345 | else { | 345 | else { |
346 | usage4 (_("Critical time must be a positive integer")); | 346 | usage4 (_("Critical time must be a positive integer")); |
347 | } | 347 | } |
348 | break; | 348 | break; |
349 | case 'v': /* verbose */ | 349 | case 'v': /* verbose */ |
350 | verbose = TRUE; | 350 | verbose = true; |
351 | break; | 351 | break; |
352 | case 't': /* timeout */ | 352 | case 't': /* timeout */ |
353 | if (is_intnonneg (optarg)) { | 353 | if (is_intnonneg (optarg)) { |