[monitoring-plugins] More local variables, less implicit boolean

Lorenz Kästle git at monitoring-plugins.org
Sun Mar 9 23:50:12 CET 2025


 Module: monitoring-plugins
 Branch: master
 Commit: 6928d9e9ad0eb279ab513e95e802daa43d8409dc
 Author: Lorenz Kästle <12514511+RincewindsHat at users.noreply.github.com>
   Date: Fri Mar  7 19:23:46 2025 +0100
    URL: https://www.monitoring-plugins.org/repositories/monitoring-plugins/commit/?id=6928d9e9

More local variables, less implicit boolean

---

 plugins/check_game.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/plugins/check_game.c b/plugins/check_game.c
index d078e4b5..fc1afb42 100644
--- a/plugins/check_game.c
+++ b/plugins/check_game.c
@@ -144,7 +144,6 @@ int main(int argc, char **argv) {
 #define max_players_field_index 130
 
 check_game_config_wrapper process_arguments(int argc, char **argv) {
-	int opt_index = 0;
 	static struct option long_opts[] = {{"help", no_argument, 0, 'h'},
 										{"version", no_argument, 0, 'V'},
 										{"verbose", no_argument, 0, 'v'},
@@ -179,7 +178,8 @@ check_game_config_wrapper process_arguments(int argc, char **argv) {
 		}
 	}
 
-	while (1) {
+	int opt_index = 0;
+	while (true) {
 		int option_index = getopt_long(argc, argv, "hVvt:H:P:G:g:p:m:", long_opts, &opt_index);
 
 		if (option_index == -1 || option_index == EOF) {



More information about the Commits mailing list