From 51db32cc1dab0cecb62484b048b3bdf27fd871af Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Wed, 18 Oct 2023 20:24:13 +0200 Subject: check_ssh: Use C99 booleans diff --git a/plugins/check_ssh.c b/plugins/check_ssh.c index 8ccbd5a..4eb746c 100644 --- a/plugins/check_ssh.c +++ b/plugins/check_ssh.c @@ -47,7 +47,7 @@ int port = -1; char *server_name = NULL; char *remote_version = NULL; char *remote_protocol = NULL; -int verbose = FALSE; +bool verbose = false; int process_arguments (int, char **); int validate_arguments (void); @@ -57,7 +57,6 @@ void print_usage (void); int ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol); - int main (int argc, char **argv) { @@ -133,7 +132,7 @@ process_arguments (int argc, char **argv) print_help (); exit (STATE_UNKNOWN); case 'v': /* verbose */ - verbose = TRUE; + verbose = true; break; case 't': /* timeout period */ if (!is_integer (optarg)) @@ -158,7 +157,7 @@ process_arguments (int argc, char **argv) remote_protocol = optarg; break; case 'H': /* host */ - if (is_host (optarg) == FALSE) + if (!is_host (optarg)) usage2 (_("Invalid hostname/address"), optarg); server_name = optarg; break; @@ -272,7 +271,7 @@ ssh_connect (char *haddr, int hport, char *remote_version, char *remote_protocol printf (_("SSH OK - %s (protocol %s) | %s\n"), ssh_server, ssh_proto, fperfdata("time", elapsed_time, "s", - FALSE, 0, FALSE, 0, TRUE, 0, TRUE, (int)socket_timeout)); + false, 0, false, 0, true, 0, true, (int)socket_timeout)); close(sd); exit (STATE_OK); } -- cgit v0.10-9-g596f