diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-10-19 08:48:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-19 08:48:32 (GMT) |
commit | 47cb10013e6935bb6cdf470925ea5a5f74464646 (patch) | |
tree | bb871753b0c5f8c7a45a6f55c3977c060ead765c /plugins/check_game.c | |
parent | 5b29a86e3a31405f3070a82f81b171068576015e (diff) | |
parent | efe79595d3813b81f873f125260d0f9937535134 (diff) | |
download | monitoring-plugins-47cb10013e6935bb6cdf470925ea5a5f74464646.tar.gz |
Merge pull request #1948 from RincewindsHat/more_booleans
Replace most of the boolean variables declared as "int" with "bool"
Diffstat (limited to 'plugins/check_game.c')
-rw-r--r-- | plugins/check_game.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/check_game.c b/plugins/check_game.c index a534b69..ca12697 100644 --- a/plugins/check_game.c +++ b/plugins/check_game.c | |||
@@ -53,7 +53,7 @@ char *server_ip; | |||
53 | char *game_type; | 53 | char *game_type; |
54 | int port = 0; | 54 | int port = 0; |
55 | 55 | ||
56 | int verbose; | 56 | bool verbose = false; |
57 | 57 | ||
58 | int qstat_game_players_max = -1; | 58 | int qstat_game_players_max = -1; |
59 | int qstat_game_players = -1; | 59 | int qstat_game_players = -1; |
@@ -90,7 +90,7 @@ main (int argc, char **argv) | |||
90 | if (port) | 90 | if (port) |
91 | xasprintf (&command_line, "%s:%-d", command_line, port); | 91 | xasprintf (&command_line, "%s:%-d", command_line, port); |
92 | 92 | ||
93 | if (verbose > 0) | 93 | if (verbose) |
94 | printf ("%s\n", command_line); | 94 | printf ("%s\n", command_line); |
95 | 95 | ||
96 | /* run the command. historically, this plugin ignores output on stderr, | 96 | /* run the command. historically, this plugin ignores output on stderr, |
@@ -142,11 +142,11 @@ main (int argc, char **argv) | |||
142 | ret[qstat_map_field], | 142 | ret[qstat_map_field], |
143 | ret[qstat_ping_field], | 143 | ret[qstat_ping_field], |
144 | perfdata ("players", atol(ret[qstat_game_players]), "", | 144 | perfdata ("players", atol(ret[qstat_game_players]), "", |
145 | FALSE, 0, FALSE, 0, | 145 | false, 0, false, 0, |
146 | TRUE, 0, TRUE, atol(ret[qstat_game_players_max])), | 146 | true, 0, true, atol(ret[qstat_game_players_max])), |
147 | fperfdata ("ping", strtod(ret[qstat_ping_field], NULL), "", | 147 | fperfdata ("ping", strtod(ret[qstat_ping_field], NULL), "", |
148 | FALSE, 0, FALSE, 0, | 148 | false, 0, false, 0, |
149 | TRUE, 0, FALSE, 0)); | 149 | true, 0, false, 0)); |
150 | } | 150 | } |
151 | 151 | ||
152 | return result; | 152 | return result; |
@@ -201,7 +201,7 @@ process_arguments (int argc, char **argv) | |||
201 | print_revision (progname, NP_VERSION); | 201 | print_revision (progname, NP_VERSION); |
202 | exit (STATE_UNKNOWN); | 202 | exit (STATE_UNKNOWN); |
203 | case 'v': /* version */ | 203 | case 'v': /* version */ |
204 | verbose = TRUE; | 204 | verbose = true; |
205 | break; | 205 | break; |
206 | case 't': /* timeout period */ | 206 | case 't': /* timeout period */ |
207 | timeout_interval = atoi (optarg); | 207 | timeout_interval = atoi (optarg); |